mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Play even nicer with celluloid
This commit is contained in:
parent
e980ed7c3c
commit
be90cb2da4
1 changed files with 2 additions and 3 deletions
|
@ -10,9 +10,7 @@ module Sidekiq
|
|||
include Celluloid
|
||||
include Sidekiq::Util
|
||||
|
||||
# Timeout for Redis#blpop.
|
||||
TIMEOUT = 1
|
||||
RETRY_DELAY = 1
|
||||
|
||||
def initialize(mgr, queues)
|
||||
@mgr = mgr
|
||||
|
@ -43,7 +41,8 @@ module Sidekiq
|
|||
rescue => ex
|
||||
logger.error("Error while fetching messages: #{ex}")
|
||||
logger.error(ex.backtrace.join("\n"))
|
||||
after(RETRY_DELAY) { fetch }
|
||||
sleep(TIMEOUT)
|
||||
after(0) { fetch }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue