Renneke / xyzflow

Powerful but lightweight orchestration framework for python
Apache License 2.0
1 stars 0 forks source link

Task does not see changes, if wrapped by task decorator #14

Closed tbrandtner closed 2 years ago

tbrandtner commented 2 years ago

The content of the run() method of a WrapperTask inside a task decorator is always the same. Therefore, inspect.getsource(self.run), which is used during the hash generation to determine whether a task result is already cached or not, will not see, if the decorated task itself has been changed. In that case you would need to run inspect.getsource() on the function, which has been decorated - and not the generic run() method of the WrapperTask class.

Renneke commented 2 years ago

If using the decorator now, the hash will be correctly calculated using the wrapped function instead