Module: SolidQueue::Job::Retryable

Extended by:
ActiveSupport::Concern
Defined in:
app/models/solid_queue/job/retryable.rb

Instance Method Summary collapse

Instance Method Details

#failed_with(exception) ⇒ Object



18
19
20
# File 'app/models/solid_queue/job/retryable.rb', line 18

def failed_with(exception)
  FailedExecution.create_or_find_by!(job_id: id, exception: exception)
end

#reset_execution_countersObject



22
23
24
25
26
# File 'app/models/solid_queue/job/retryable.rb', line 22

def reset_execution_counters
  arguments["executions"] = 0
  arguments["exception_executions"] = {}
  save!
end

#retryObject



14
15
16
# File 'app/models/solid_queue/job/retryable.rb', line 14

def retry
  failed_execution&.retry
end