def any_cancels(self): """Determines if there are any task cancellations. :return: True if there is one or more tasks in cancelled state. """ t_execs = lookup_utils.find_cancelled_task_executions(self.wf_ex.id) return len(t_execs) > 0
def _build_cancel_info_message(wf_ctrl, wf_ex): # Try to find where cancel is exactly. cancelled_tasks = sorted(lookup_utils.find_cancelled_task_executions( wf_ex.id), key=lambda t: t.name) return ('Cancelled tasks: %s' % ', '.join([t.name for t in cancelled_tasks]))
def any_cancels(self): """Determines if there are any task cancellations. :return: True if there is one or more tasks in cancelled state. """ t_execs = lookup_utils.find_cancelled_task_executions(self.wf_ex.id) return len(t_execs) > 0
def _build_cancel_info_message(wf_ctrl, wf_ex): # Try to find where cancel is exactly. cancelled_tasks = sorted( lookup_utils.find_cancelled_task_executions(wf_ex.id), key=lambda t: t.name ) return ( 'Cancelled tasks: %s' % ', '.join([t.name for t in cancelled_tasks]) )