Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions examples/workflow/child_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ def child_workflow(ctx: wf.DaprWorkflowContext):

if __name__ == '__main__':
wfr.start()
time.sleep(10) # wait for workflow runtime to start

wf_client = wf.DaprWorkflowClient()
instance_id = wf_client.schedule_new_workflow(workflow=main_workflow)

# Wait for the workflow to complete
time.sleep(5)
wf_client.wait_for_workflow_completion(instance_id)

wfr.shutdown()
4 changes: 1 addition & 3 deletions examples/workflow/cross-app1.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ def app1_workflow(ctx: wf.DaprWorkflowContext):

if __name__ == '__main__':
wfr.start()
time.sleep(10) # wait for workflow runtime to start

wf_client = wf.DaprWorkflowClient()
print('app1 - triggering app1 workflow', flush=True)
instance_id = wf_client.schedule_new_workflow(workflow=app1_workflow)

# Wait for the workflow to complete
time.sleep(7)
wf_client.wait_for_workflow_completion(instance_id)

wfr.shutdown()
2 changes: 1 addition & 1 deletion examples/workflow/cross-app2.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ def app2_workflow(ctx: wf.DaprWorkflowContext):

if __name__ == '__main__':
wfr.start()
time.sleep(15) # wait for workflow runtime to start
time.sleep(15) # Keep the workflow runtime running for a while to process workflows
wfr.shutdown()
2 changes: 1 addition & 1 deletion examples/workflow/cross-app3.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ def app3_activity(ctx: wf.DaprWorkflowContext) -> int:

if __name__ == '__main__':
wfr.start()
time.sleep(15) # wait for workflow runtime to start
time.sleep(15) # Keep the workflow runtime alive for a while to process requests
wfr.shutdown()
1 change: 0 additions & 1 deletion examples/workflow/fan_out_fan_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def process_results(ctx, final_result: int):

if __name__ == '__main__':
wfr.start()
time.sleep(10) # wait for workflow runtime to start

wf_client = wf.DaprWorkflowClient()
instance_id = wf_client.schedule_new_workflow(workflow=batch_processing_workflow, input=10)
Expand Down
Loading