1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

inline stringify

This commit is contained in:
Mike Perham 2017-05-15 14:50:23 -07:00
parent 11028ed38b
commit 528ca61ab2
2 changed files with 2 additions and 11 deletions

View file

@ -149,12 +149,8 @@ module Sidekiq
end
def self.default_worker_options=(hash)
h = hash.dup
# stringify
h.keys.each do |key|
h[key.to_s] = h.delete(key)
end
@default_worker_options = default_worker_options.merge(h)
@default_worker_options = default_worker_options.merge(Hash[hash.map{|k, v| [k.to_s, v]}])
end
def self.default_worker_options
defined?(@default_worker_options) ? @default_worker_options : DEFAULT_WORKER_OPTIONS

View file

@ -117,13 +117,8 @@ module Sidekiq
# In practice, any option is allowed. This is the main mechanism to configure the
# options for a specific job.
def sidekiq_options(opts={})
h = opts.dup
# stringify
h.keys.each do |key|
h[key.to_s] = h.delete(key)
end
self.sidekiq_options_hash = get_sidekiq_options.merge(h)
self.sidekiq_options_hash = get_sidekiq_options.merge(Hash[opts.map{|k, v| [k.to_s, v]}])
end
def sidekiq_retry_in(&block)