lib/patriot/worker/base.rb in patriot-workflow-scheduler-0.8.4 vs lib/patriot/worker/base.rb in patriot-workflow-scheduler-0.8.5
- old
+ new
@@ -83,13 +83,18 @@
execute_with_retry{ @job_store.report_completion_status(job_ticket) }
rescue Exception => job_store_error
@logger.error job_store_error
end
unless command.post_processors.nil?
+ continue_post_processing = true
command.post_processors.each do |pp|
begin
- @logger.info "executing post process by #{pp}"
- pp.process(command, self, job_ticket)
+ if continue_post_processing
+ @logger.info "executing post process by #{pp}"
+ continue_post_processing = continue_post_processing && pp.process(command, self, job_ticket)
+ else
+ @logger.info "skipping post process by #{pp}"
+ end
rescue Exception => post_process_error
@logger.error "post process by #{pp} failed"
@logger.error post_process_error
end
end