temporalio / samples-python

Samples for working with the Temporal Python SDK
MIT License
120 stars 54 forks source link

Message-processing design patterns #114

Open dandavison opened 4 months ago

dandavison commented 4 months ago

This PR contains proposals for how the Python SDK could help users defer update processing, control interleaving of handler coroutines, and ensure processing is complete before workflow completion.

update/job_runner_I1.py and update/job_runner_I2.py show how users can do this themselves, with minimal SDK changes.

update/job_runner_I1_native.py and update/job_runner_I2_native.py show how the SDK could be modified to make this easier and less error-prone for users.