Method: Sidekiq::Throttled::Middlewares::Server#call

Defined in:
lib/sidekiq/throttled/middlewares/server.rb

#call(_worker, msg, _queue) ⇒ Object

[View source]

14
15
16
17
18
19
20
21
22
23
24
# File 'lib/sidekiq/throttled/middlewares/server.rb', line 14

def call(_worker, msg, _queue)
  yield
ensure
  message = Message.new(msg)

  if message.job_class && message.job_id
    Registry.get(message.job_class) do |strategy|
      strategy.finalize!(message.job_id, *message.job_args)
    end
  end
end