mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
inline stringify
This commit is contained in:
parent
11028ed38b
commit
528ca61ab2
2 changed files with 2 additions and 11 deletions
|
@ -149,12 +149,8 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.default_worker_options=(hash)
|
def self.default_worker_options=(hash)
|
||||||
h = hash.dup
|
|
||||||
# stringify
|
# stringify
|
||||||
h.keys.each do |key|
|
@default_worker_options = default_worker_options.merge(Hash[hash.map{|k, v| [k.to_s, v]}])
|
||||||
h[key.to_s] = h.delete(key)
|
|
||||||
end
|
|
||||||
@default_worker_options = default_worker_options.merge(h)
|
|
||||||
end
|
end
|
||||||
def self.default_worker_options
|
def self.default_worker_options
|
||||||
defined?(@default_worker_options) ? @default_worker_options : DEFAULT_WORKER_OPTIONS
|
defined?(@default_worker_options) ? @default_worker_options : DEFAULT_WORKER_OPTIONS
|
||||||
|
|
|
@ -117,13 +117,8 @@ module Sidekiq
|
||||||
# In practice, any option is allowed. This is the main mechanism to configure the
|
# In practice, any option is allowed. This is the main mechanism to configure the
|
||||||
# options for a specific job.
|
# options for a specific job.
|
||||||
def sidekiq_options(opts={})
|
def sidekiq_options(opts={})
|
||||||
h = opts.dup
|
|
||||||
# stringify
|
# stringify
|
||||||
h.keys.each do |key|
|
self.sidekiq_options_hash = get_sidekiq_options.merge(Hash[opts.map{|k, v| [k.to_s, v]}])
|
||||||
h[key.to_s] = h.delete(key)
|
|
||||||
end
|
|
||||||
|
|
||||||
self.sidekiq_options_hash = get_sidekiq_options.merge(h)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def sidekiq_retry_in(&block)
|
def sidekiq_retry_in(&block)
|
||||||
|
|
Loading…
Reference in a new issue