From 335ab728b8bfef3b3fad3f73b2773acb452cccec Mon Sep 17 00:00:00 2001 From: woutdenolf <woutdenolf@users.sf.net> Date: Sat, 30 Sep 2023 17:24:43 +0200 Subject: [PATCH] merging task inputs and outputs should only be done for ppf methods --- setup.cfg | 2 +- src/ewoksppf/bindings.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 27fafc0..51d762a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ packages=find: python_requires = >=3.6 install_requires = ewokscore >=0.4.1 - pypushflow >=0.6.0 + pypushflow >=0.6.1 [options.packages.find] where=src diff --git a/src/ewoksppf/bindings.py b/src/ewoksppf/bindings.py index 375b032..d624568 100644 --- a/src/ewoksppf/bindings.py +++ b/src/ewoksppf/bindings.py @@ -77,12 +77,21 @@ class EwoksPythonActor(PythonActor): super().__init__(**kw) def trigger(self, inData: dict): + # Update the INFOKEY with node information infokey = ppfrunscript.INFOKEY inData[infokey] = dict(inData[infokey]) inData[infokey]["node_id"] = self.node_id inData[infokey]["node_attrs"] = self.node_attrs return super().trigger(inData) + def compileDownstreamData(self, result: dict) -> dict: + # Merging inputs and outputs to trigger the next task + # is not an ewoks convention. `ppfmethod` tasks still + # have it thanks to `ewokscore.ppftasks`. + # + # We do need to take INFOKEY from the inputs. + return {ppfrunscript.INFOKEY: self.inData[ppfrunscript.INFOKEY], **result} + def uploadInDataToMongo(self, **kw): task_identifier = self.node_attrs.get("task_identifier") if task_identifier: -- GitLab