class Sidekiq::Notifications::ClientMiddleware

Public Instance Methods

call(worker_class, job, queue, redis_pool) { || ... } click to toggle source
# File lib/sidekiq/notifications/client_middleware.rb, line 6
def call(worker_class, job, queue, redis_pool)
  method = job['at'] ? 'perform_in' : 'perform_async'

  ActiveSupport::Notifications.instrument('app.worker.enqueue', title: "#{worker_class.to_s}##{method}", job: job) do
    yield
  end
end