From 7c3b699259dd8afb10b89ea33b141f9ba88fe5c0 Mon Sep 17 00:00:00 2001 From: waylon <1158341873@qq.com> Date: Tue, 29 Nov 2022 20:35:45 +0800 Subject: [PATCH] =?UTF-8?q?optimization:=20=E8=8A=82=E7=82=B9=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=94=AF=E6=8C=81pickle=E5=BA=8F=E5=88=97=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/bamboo-pipeline/pipeline/eri/runtime.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/bamboo-pipeline/pipeline/eri/runtime.py b/runtime/bamboo-pipeline/pipeline/eri/runtime.py index 44631e98..e57b03ea 100644 --- a/runtime/bamboo-pipeline/pipeline/eri/runtime.py +++ b/runtime/bamboo-pipeline/pipeline/eri/runtime.py @@ -89,13 +89,14 @@ def _data_inputs_assemble( cv_key = "${%s_%s}" % (k, node_id) if len(cv_key) > 128: raise ValueError("var key %s length exceeds 128" % cv_key) + serialized, serializer = self._serialize(v["value"]) context_values.append( ContextValue( pipeline_id=pipeline_id, key=cv_key, type=ContextValueType.COMPUTE.value, - serializer=self.JSON_SERIALIZER, - value=json.dumps(v["value"]), + serializer=serializer, + value=serialized, code=v.get("custom_type", ""), ) ) @@ -268,13 +269,14 @@ def _prepare( if not source_act: context_var_references[key] = Template(input_data["value"]).get_reference() final_references[key] = set() + serialized, serializer = self._serialize(input_data["value"]) context_values.append( ContextValue( pipeline_id=pipeline["id"], key=key, type=CONTEXT_VALUE_TYPE_MAP[input_data["type"]], - serializer=self.JSON_SERIALIZER, - value=json.dumps(input_data["value"]), + serializer=serializer, + value=serialized, code=input_data.get("custom_type", ""), ) )