Method: SimplerWorkflow::Activity#perform_task
- Defined in:
- lib/simpler_workflow/activity.rb
#perform_task(task) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/simpler_workflow/activity.rb', line 54 def perform_task(task) logger.info("Performing task #{name}") @perform_task.call(task) rescue => e context = {} context[:activity_type] = [name.to_s, version] context[:input] = task.input context[:activity_id] = task.activity_id SimplerWorkflow.exception_reporter.report(e, context) task.fail! :reason => e.[0..250], :details => {:failure_policy => failure_policy}.to_json end |