Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate workflow.all_handlers_finished #139

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

drewhoskins-temporal
Copy link
Contributor

@drewhoskins-temporal drewhoskins-temporal commented Aug 31, 2024

What was changed

Before workflow.all_handlers_finished existed, I worked around it by checking a lock to see if we were in the middle of any handlers before continuing as new.
Now in 1.7, we can use the new method to prevent dangling handlers.

Why?

Demonstrate what should become standard practice.

Checklist

  1. Closes

  2. How was this tested:

# Terminal 1
cd updates_and_signals/safe_message_handlers
poetry run python ./worker.py
# Terminal 2
cd updates_and_signals/safe_message_handlers
poetry run python starter.py --test-continue-as-new
  1. Any docs updates needed?

Yes, see the README.md

Copy link
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@drewhoskins-temporal drewhoskins-temporal merged commit 4df348a into main Sep 4, 2024
9 checks passed
@cretz cretz deleted the drewhoskins_queue_handler branch September 4, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants