mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use Sidekiq.options to set initial wait
The INITIAL_WAIT constant has moved to the Sidekiq::Poller class but rather than setting the constant directly we can override it via the `:poll_interval_average` option. This was causing random build failures because the test was waiting for 10 seconds for the job to execute but the initial wait was a random value between 10 and 15 seconds.
This commit is contained in:
parent
2e501ac9c4
commit
a22523abcd
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ module SidekiqJobsManager
|
|||
timeout: 1,
|
||||
})
|
||||
Sidekiq.average_scheduled_poll_interval = 0.5
|
||||
Sidekiq::Scheduled.const_set :INITIAL_WAIT, 1
|
||||
Sidekiq.options[:poll_interval_average] = 1
|
||||
begin
|
||||
sidekiq.run
|
||||
continue_write.puts "started"
|
||||
|
|
Loading…
Reference in a new issue