Просмотр исходного кода

Add wait before retrying failed jobs (Fix #1950)

Ryan Lue 7 лет назад
Родитель
Сommit
a04edeb7ff
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      app/models/scheduler.rb

+ 1 - 0
app/models/scheduler.rb

@@ -245,6 +245,7 @@ class Scheduler < ApplicationModel
 
 
     # restart job again
     # restart job again
     if try_run_max > try_count
     if try_run_max > try_count
+      sleep(try_count) # wait between retries (see https://github.com/zammad/zammad/issues/1950)
       _start_job(job, try_count, try_run_time)
       _start_job(job, try_count, try_run_time)
     else
     else
       # release thread lock and remove thread handle
       # release thread lock and remove thread handle