class RetryJob

Public Instance Methods

perform(raising, attempts) click to toggle source
# File activejob/test/jobs/retry_job.rb, line 23
def perform(raising, attempts)
  if executions < attempts
    JobBuffer.add("Raised #{raising} for the #{executions.ordinalize} time")
    raise raising.constantize
  else
    JobBuffer.add("Successfully completed job")
  end
end