mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Various cleanups
This commit is contained in:
parent
be90cb2da4
commit
091d88bc33
4 changed files with 7 additions and 10 deletions
|
@ -1,7 +1,9 @@
|
||||||
HEAD
|
HEAD
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
- Gracefully rescue any errors thrown in the Fetcher and sleep for 1 second before retrying.
|
- Better network error handling when fetching jobs from Redis.
|
||||||
|
Sidekiq will retry once per second until it can re-establish
|
||||||
|
a connection.
|
||||||
|
|
||||||
1.1.2
|
1.1.2
|
||||||
-----------
|
-----------
|
||||||
|
|
|
@ -39,8 +39,8 @@ module Sidekiq
|
||||||
after(0) { fetch }
|
after(0) { fetch }
|
||||||
end
|
end
|
||||||
rescue => ex
|
rescue => ex
|
||||||
logger.error("Error while fetching messages: #{ex}")
|
logger.error("Error fetching message: #{ex}")
|
||||||
logger.error(ex.backtrace.join("\n"))
|
logger.error(ex.backtrace.first)
|
||||||
sleep(TIMEOUT)
|
sleep(TIMEOUT)
|
||||||
after(0) { fetch }
|
after(0) { fetch }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module Sidekiq
|
module Sidekiq
|
||||||
VERSION = "1.1.2"
|
VERSION = "1.1.3"
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,11 +29,6 @@ module Sidekiq
|
||||||
Sidekiq::Client.push('class' => self, 'args' => args)
|
Sidekiq::Client.push('class' => self, 'args' => args)
|
||||||
end
|
end
|
||||||
|
|
||||||
def queue(name)
|
|
||||||
puts "DEPRECATED: `queue :name` is now `sidekiq_options :queue => :name`"
|
|
||||||
Sidekiq::Client.queue_mappings[self.name] = name.to_s
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Allows customization for this type of Worker.
|
# Allows customization for this type of Worker.
|
||||||
# Legal options:
|
# Legal options:
|
||||||
|
@ -46,7 +41,7 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_sidekiq_options # :nodoc:
|
def get_sidekiq_options # :nodoc:
|
||||||
@sidekiq_options || { 'unique' => true, 'retry' => true, 'queue' => 'default' }
|
defined?(@sidekiq_options) ? @sidekiq_options : { 'unique' => true, 'retry' => true, 'queue' => 'default' }
|
||||||
end
|
end
|
||||||
|
|
||||||
def stringify_keys(hash) # :nodoc:
|
def stringify_keys(hash) # :nodoc:
|
||||||
|
|
Loading…
Reference in a new issue