Browse Source

En cours de développement

master
losyme 7 months ago
parent
commit
5fa2d0c20d
  1. 12
      workers/worker.go

12
workers/worker.go

@ -58,6 +58,12 @@ func (w *worker) cloneLogger(job *jw.Job) (Logger, error) {
}
func (w *worker) maybeRunJob() time.Duration {
defer func() {
if data := recover(); data != nil {
w.logger.Fatal("PANIC ERROR RECOVERED", "data", data) //::::::::::::::::::::::::::::::::::::::::::::::::::::
}
}()
job, err := w.runner.Model().NextJob(w.runner.Namespace())
if err != nil {
return 5 * time.Second
@ -114,12 +120,6 @@ func (w *worker) maybeRunJob() time.Duration {
}
func (w *worker) loop() {
defer func() {
if data := recover(); data != nil {
w.logger.Fatal("PANIC ERROR RECOVERED", "data", data) //::::::::::::::::::::::::::::::::::::::::::::::::::::
}
}()
timer := time.NewTimer(0)
defer func() {

Loading…
Cancel
Save