-
Notifications
You must be signed in to change notification settings - Fork 131
Activity worker: refactoring part 2 #899
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
Conversation
0fde874
to
8213e5e
Compare
8213e5e
to
8d3f066
Compare
temporalio/worker/_activity.py
Outdated
running_tasks = [v.task for v in self._running_activities.values() if v.task] | ||
if running_tasks: | ||
await asyncio.gather(*running_tasks, return_exceptions=False) | ||
await asyncio.gather(*running_tasks, return_exceptions=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me (we don't want to return until all tasks are complete) except now this swallows exceptions. Has this logic been hit and is raising somehow today? I suspect we did mean to have this be return_exceptions=True
originally, just want to confirm whether there is something observed precipitating this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave this for a PR focused specifically on changing that. Perhaps we want to consume the stream and re-raise any exceptions encountered. We'd discussed this previously at #860 (comment) and concluded that we felt it should be changed. Also I'm going to want the Nexus worker to do the thing we think is right. But, I've reverted this change: let's merge this PR with the pure refactoring (it will keep activity and nexus workers consistent) and kick this issue down the road one more time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. May want to change PR title/description.
8d3f066
to
f13fdc6
Compare
wait_all_completed
+ refactoringf13fdc6
to
ea31487
Compare
wait_all_completed