Module: Sidekiq Private
- Defined in:
- lib/sidekiq_unique_jobs/testing.rb,
lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: Worker Classes: Job, JobSet, Queue, ScheduledSet, SortedEntry
Class Method Summary collapse
-
.use_options(tmp_config = {}) ⇒ Object
Temporarily turn Sidekiq’s options into something different.
Class Method Details
.use_options(tmp_config = {}) ⇒ Object
Note:
this method will restore the original options after yielding
Temporarily turn Sidekiq’s options into something different
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/sidekiq_unique_jobs/testing.rb', line 24 def self.(tmp_config = {}) = .dup .clear self. = tmp_config yield ensure .clear self. = DEFAULT_WORKER_OPTIONS self. = end |