Class: Cased::Integrations::Sidekiq::ServerMiddleware
- Inherits:
-
Object
- Object
- Cased::Integrations::Sidekiq::ServerMiddleware
- Defined in:
- lib/cased/integrations/sidekiq/server_middleware.rb
Instance Method Summary collapse
Instance Method Details
#call(_worker, job, _queue) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cased/integrations/sidekiq/server_middleware.rb', line 7 def call(_worker, job, _queue) context = (job['cased_context'] || {}) context['job_class'] = job['class'] Cased::Context.current = context yield ensure Cased::Context.clear! end |