Commit aeff08c2 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

esrftaskgraph: Task.done when not outputs

parent 3612535c
......@@ -58,6 +58,7 @@ class Task(Registered, hashing.UniversalHashable, register=False):
# Misc
self._exception = None
self._done = None
# The output hash will update dynamically if any of the input
# variables change
......@@ -191,7 +192,10 @@ class Task(Registered, hashing.UniversalHashable, register=False):
@property
def done(self):
"""Completed (with or without exception)"""
return self.failed or self._outputs.has_value
if self._OUTPUT_NAMES:
return self.failed or self._outputs.has_value
else:
return self._done or self.failed
@property
def failed(self):
......@@ -232,6 +236,8 @@ class Task(Registered, hashing.UniversalHashable, register=False):
self._exception = e
if raise_on_error:
raise
else:
self._done = True
def run(self):
"""To be implemented by the derived classes"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment