From 68682b3607f65e0dbe8401fccb6137f0928f9ad1 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 27 Apr 2018 09:26:20 +0200 Subject: [PATCH] Refactoring: Improved test performance and stability by sleeping only in production env. --- app/models/scheduler.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/scheduler.rb b/app/models/scheduler.rb index 6c0576356..e3b1baa60 100644 --- a/app/models/scheduler.rb +++ b/app/models/scheduler.rb @@ -251,7 +251,8 @@ 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) + # wait between retries (see https://github.com/zammad/zammad/issues/1950) + sleep(try_count) if Rails.env.production? _start_job(job, try_count, try_run_time) else # release thread lock and remove thread handle