Class: RailsWorkflow::OperationErrorJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- RailsWorkflow::OperationErrorJob
- Defined in:
- app/jobs/rails_workflow/operation_error_job.rb
Overview
When some operation fails due to some exceptions this job is responsible for setting operation to error status. Also it check if there is parent processes / operations and set it to error status.
Instance Method Summary collapse
Instance Method Details
#perform(*args) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/jobs/rails_workflow/operation_error_job.rb', line 9 def perform(*args) @target_id, @target_class = args target.status = target.class::ERROR target.save process_parents end |