class Sidekiq::Middleware::Server::Stats::ResqueLike

Public Instance Methods

call(worker, msg, queue) { || ... } click to toggle source

Update the status, and add other information (such as the job description) into redis

# File lib/sidekiq-resque_status/middleware/server/resque_like.rb, line 9
def call(worker, msg, queue)
  begin
    job_in_progress(worker, msg, queue)
    start_time = Time.now
    yield
    job_completed(worker, msg, queue, Time.now-start_time)
  rescue Exception => error
    job_failed(worker, msg, queue, error)
  end
end