Module: Sidekiq::Single::Job::ClassMethods
- Defined in:
- lib/sidekiq/single/job.rb
Instance Method Summary collapse
Instance Method Details
#locked_for?(*args) ⇒ Boolean
17 18 19 20 21 22 |
# File 'lib/sidekiq/single/job.rb', line 17 def locked_for?(*args) meth = ["unique_args"] item = { "args" => args, "unique_args" => meth } Lock.new(item).fastened? end |
#single_options(opts) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/sidekiq/single/job.rb', line 8 def (opts) opts = opts.stringify_keys opts["unique_for"] = opts["unique_for"]&.to_i raise InvalidConfiguration if opts["unique_for"].nil? (opts) end |