def _on_complete_hook(self, my_task): context = my_task.workflow.get_task_spec_from_name(self.context) triggered = [] for task in my_task.workflow.task_tree: if task.thread_id != my_task.thread_id: continue if task.task_spec == context: task.trigger(self.choice) triggered.append(task) for task in triggered: context._predict(task) TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): """ A hook into _on_complete() that does the task specific work. :type my_task: Task :param my_task: A task in which this method is executed. :rtype: bool :returns: True on success, False otherwise. """ for i in range(self.times + self.queued): for task_name in self.context: task = my_task.workflow.get_task_spec_from_name(task_name) task._on_trigger(my_task) self.queued = 0 TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): context = my_task.workflow.get_task_spec_from_name(self.context) for task in my_task.workflow.task_tree: if task.thread_id != my_task.thread_id: continue if task.task_spec == context: task.trigger(self.choice) return TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): for task_name in self.context: cancel_tasks = my_task.workflow.get_task_spec_from_name(task_name) for cancel_task in my_task._get_root()._find_any(cancel_tasks): cancel_task.cancel() TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): my_task._assign_new_thread_id() TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): my_task.workflow.cancel(self.cancel_successfully) TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): if self.transforms: for transform in self.transforms: exec(transform) return TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): return TaskSpec._on_complete_hook(self, my_task)
def _on_complete_hook(self, my_task): my_task.workflow.cancel(self.cancel_successfully) return TaskSpec._on_complete_hook(self, my_task)