cadence-python icon indicating copy to clipboard operation
cadence-python copied to clipboard

[question] Behaviour when Activity.do_not_complete_on_return() is called

Open MahendiraBoopathi opened this issue 3 years ago • 1 comments

Registered n number of activities which is part of one workflow. Workflow execution is started and activity 1 is called. I donot want activity2 to start until activity 1 completes, so used Activity.do_not_complete_on_return() inside activity implementation code. Later this activity is completed by external services.

But until activity 1 completes the process thread is blocked.

Is there anyway to unblock the thread so that it can process other events ? and still activity 2 can be dependent on completion of activity 1.

MahendiraBoopathi avatar Jun 28 '22 15:06 MahendiraBoopathi

update: client.wait_for_close() is a blocking call. starting this call in a separate thread will solve this issue.

MahendiraBoopathi avatar Jul 20 '22 12:07 MahendiraBoopathi