mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Remove 10 second wait in Poller if the poll interval is already set, since there's no reason to wait for the heartbeats.
This commit is contained in:
parent
67dc6676ca
commit
70e61dbe71
1 changed files with 4 additions and 4 deletions
|
@ -85,10 +85,10 @@ module Sidekiq
|
||||||
|
|
||||||
def initial_wait
|
def initial_wait
|
||||||
begin
|
begin
|
||||||
# Have all processes sleep between 10-15 seconds. 10 seconds
|
# Have all processes sleep between 5-15 seconds. 10 seconds
|
||||||
# to give time for the heartbeat to register and 5 random seconds
|
# to give time for the heartbeat to register (if the poll interval is going to be calculated by the number
|
||||||
# to ensure they don't all hit Redis at the same time.
|
# of workers), and 5 random seconds to ensure they don't all hit Redis at the same time.
|
||||||
sleep(INITIAL_WAIT)
|
sleep(INITIAL_WAIT) unless Sidekiq.options[:poll_interval]
|
||||||
sleep(5 * rand)
|
sleep(5 * rand)
|
||||||
rescue Celluloid::Task::TerminatedError
|
rescue Celluloid::Task::TerminatedError
|
||||||
# Hit Ctrl-C when Sidekiq is finished booting and we have a chance
|
# Hit Ctrl-C when Sidekiq is finished booting and we have a chance
|
||||||
|
|
Loading…
Reference in a new issue