コード例 #1
0
    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
コード例 #2
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]))
コード例 #3
0
ファイル: base.py プロジェクト: Tesora/tesora-mistral
    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
コード例 #4
0
ファイル: workflows.py プロジェクト: Tesora/tesora-mistral
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])
    )