Refactoring: Improved test performance and stability by sleeping only in production env.
This commit is contained in:
parent
12fb3c9126
commit
68682b3607
1 changed files with 2 additions and 1 deletions
|
@ -251,7 +251,8 @@ 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)
|
# 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)
|
_start_job(job, try_count, try_run_time)
|
||||||
else
|
else
|
||||||
# release thread lock and remove thread handle
|
# release thread lock and remove thread handle
|
||||||
|
|
Loading…
Reference in a new issue