Browse Source

Add wait before retrying failed jobs (Fix #1950)

Ryan Lue 6 years ago
parent
commit
a04edeb7ff
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/models/scheduler.rb

+ 1 - 0
app/models/scheduler.rb

@@ -245,6 +245,7 @@ class Scheduler < ApplicationModel
 
     # restart job again
     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)
     else
       # release thread lock and remove thread handle