|
|
@ -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 |
|
|
|