diff --git a/fireworks/core/rocket.py b/fireworks/core/rocket.py index f1d145c52..2afa45f14 100644 --- a/fireworks/core/rocket.py +++ b/fireworks/core/rocket.py @@ -84,6 +84,8 @@ def background_task(btask, spec, stop_event, master_thread): num_launched = 0 while not stop_event.is_set() and master_thread.isAlive(): for task in btask.tasks: + if hasattr(task, 'set_stop_event'): + task.set_stop_event(stop_event) task.run_task(spec) if btask.sleep_time > 0: stop_event.wait(btask.sleep_time)