* [python] Fix task switch set global parameter * Change name
@ -36,6 +36,14 @@ from pydolphinscheduler.tasks.switch import Branch, Default, Switch, SwitchCondi
with ProcessDefinition(
name="task_switch_example",
tenant="tenant_exists",
param=[
{
"prop": "var",
"direct": "IN",
"type": "VARCHAR",
"value": "1"
}
]
) as pd:
parent = Shell(name="parent", command="echo parent")
switch_child_1 = Shell(name="switch_child_1", command="echo switch_child_1")
@ -332,7 +332,7 @@ class ProcessDefinition(Base):
self._project,
self.name,
str(self.description) if self.description else "",
str(self.param) if self.param else None,
json.dumps(self.param) if self.param else None,
json.dumps(self.schedule_json) if self.schedule_json else None,
json.dumps(self.task_location),
self.timeout,