Browse Source

Fix f-strings variable error (#6677)

3.0.0/version-upgrade
Jiajie Zhong 3 years ago committed by GitHub
parent
commit
9fb6d6ba9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-python/pydolphinscheduler/examples/bulk_create.py

4
dolphinscheduler-python/pydolphinscheduler/examples/bulk_create.py

@ -40,12 +40,12 @@ for wf in range(0, NUM_WORKFLOWS):
with ProcessDefinition(name=workflow_name, tenant=TENANT) as pd: with ProcessDefinition(name=workflow_name, tenant=TENANT) as pd:
for t in range(0, NUM_TASKS): for t in range(0, NUM_TASKS):
task_name = f"task:{t}-workflow:{wf}" task_name = f"task:{t}-{workflow_name}"
command = f"echo This is task {task_name}" command = f"echo This is task {task_name}"
task = Shell(name=task_name, command=command) task = Shell(name=task_name, command=command)
if IS_CHAIN and t > 0: if IS_CHAIN and t > 0:
pre_task_name = f"task:{t-1}-wf:{wf}" pre_task_name = f"task:{t-1}-{workflow_name}"
pd.get_one_task_by_name(pre_task_name) >> task pd.get_one_task_by_name(pre_task_name) >> task
# We just submit workflow and task definition without set schedule time or run it manually # We just submit workflow and task definition without set schedule time or run it manually

Loading…
Cancel
Save