Merge "Use get_task_executions_count for any_cancels method"

This commit is contained in:
Zuul 2019-06-08 01:07:59 +00:00 committed by Gerrit Code Review
commit 5131444a62
1 changed files with 4 additions and 1 deletions

View File

@ -202,7 +202,10 @@ class WorkflowController(object):
:return: True if there is one or more tasks in cancelled state.
"""
return len(self._get_task_executions(state=states.CANCELLED)) > 0
return db_api.get_task_executions_count(
workflow_execution_id=self.wf_ex.id,
state=states.CANCELLED
) > 0
@abc.abstractmethod
def evaluate_workflow_final_context(self):