Browse Source

En cours de développement

master
losyme 8 months ago
parent
commit
2d3741e315
  1. 6
      workers/worker.go

6
workers/worker.go

@ -57,11 +57,15 @@ func (w *worker) cloneLogger(job *jw.Job) (Logger, error) {
return w.logger.Clone(id, name)
}
func (w *worker) maybeRunJob() time.Duration {
func (w *worker) maybeRunJob() (duration time.Duration) {
defer func() {
if data := recover(); data != nil {
w.logger.Fatal("PANIC ERROR RECOVERED", "data", data) //::::::::::::::::::::::::::::::::::::::::::::::::::::
}
duration = 5 * time.Second
w.stop()
}()
job, err := w.runner.Model().NextJob(w.runner.Namespace())

Loading…
Cancel
Save