module Sidekiq
def self.use_options(tmp_config = {})
-
tmp_config
(Hash
) -- the temporary config to use
Other tags:
- Note: - this method will restore the original options after yielding
def self.use_options(tmp_config = {}) old_config = default_worker_options default_worker_options.clear self.default_worker_options = tmp_config yield ensure default_worker_options.clear self.default_worker_options = old_config end