lib/cloud_crowd/worker.rb in cloud-crowd-0.7.3 vs lib/cloud_crowd/worker.rb in cloud-crowd-0.7.5

- old
+ new

@@ -87,10 +87,11 @@ complete_work_unit({'output' => result}.to_json) rescue Exception => e action.cleanup_work_directory if action fail_work_unit(e) end + @node.resolve_work(@unit['id']) end # Run this worker inside of a fork. Attempts to exit cleanly. # Wraps run_work_unit to benchmark the execution time, if requested. def run @@ -139,10 +140,9 @@ # When signaled to exit, make sure that the Worker shuts down without firing # the Node's at_exit callbacks. def trap_signals Signal.trap('QUIT') { Process.exit! } Signal.trap('INT') { Process.exit! } - Signal.trap('KILL') { Process.exit! } Signal.trap('TERM') { Process.exit! } end end