Fix completeness check of local workflow and requiring branches.
@@ -20,24 +20,10 @@ class LocalWorkflowProxy(BaseWorkflowProxy):
workflow_type = "local"
- add_workflow_run_decorators = False
-
def __init__(self, *args, **kwargs):
super(LocalWorkflowProxy, self).__init__(*args, **kwargs)
- self._has_run = False
- self._has_yielded = False
-
- def complete(self):
- """
- When *local_workflow_require_branches* of the task was set to *True*, returns whether the
- :py:meth:`run` method has been called before. Otherwise, the call is forwarded to the super
- class.
- """
- if self.task.local_workflow_require_branches:
- return self._has_run
- else:
- return super(LocalWorkflowProxy, self).complete()
+ self._local_workflow_has_yielded = False
def requires(self):
reqs = super(LocalWorkflowProxy, self).requires()
@@ -55,13 +41,11 @@ class LocalWorkflowProxy(BaseWorkflowProxy):
When *local_workflow_require_branches* of the task was set to *False*, starts all branch
tasks via dynamic dependencies by yielding them in a list, or simply does nothing otherwise.
"""
- if not self.task.local_workflow_require_branches and not self._has_yielded:
- self._has_yielded = True
+ if not self.task.local_workflow_require_branches and not self._local_workflow_has_yielded:
+ self._local_workflow_has_yielded = True
yield list(self.task.get_branch_tasks().values())
- self._has_run = True
-
class LocalWorkflow(BaseWorkflow):
"""
