Class: SidekiqUtils::Middleware::Client::Deprioritize
- Inherits:
-
Object
- Object
- SidekiqUtils::Middleware::Client::Deprioritize
- Defined in:
- lib/sidekiq_utils/middleware/client/deprioritize.rb
Instance Method Summary collapse
Instance Method Details
#call(worker_class, job, queue, redis_pool) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/sidekiq_utils/middleware/client/deprioritize.rb', line 5 def call(worker_class, job, queue, redis_pool) if Thread.current[:deprioritize_worker_classes].to_a.include?(worker_class) job['queue'] = 'low' end yield end |