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

Stop the whole worker process when a coroutine raises #494

Merged
merged 2 commits into from
Dec 5, 2021

Conversation

ewjoachim
Copy link
Member

Closes #493

@kriscode1 you may want to checkout this PR and test that it solves your problem.

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)

@ewjoachim ewjoachim requested a review from a team as a code owner November 28, 2021 01:37
exc: Exception


async def run_tasks(
Copy link
Member Author

@ewjoachim ewjoachim Nov 28, 2021

Choose a reason for hiding this comment

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

All in all, this function is 150 lines long, but there's a lot of doc/comments. Also, I'm not sure how to split it more efficiently. The base logic would be shorter but it order to log in all the strategic places, and because asyncio.Task supports task names only on 3.8+, we end up with more complex code.

@ewjoachim ewjoachim force-pushed the exception-swallowed-493 branch from 9edc169 to 3f7ca87 Compare November 29, 2021 18:14
@kriscode1
Copy link

@ewjoachim thank you for the speedy fix! I tested this branch in my environment and it solves the issue.

@ewjoachim
Copy link
Member Author

Thanks for your feedback :) I'll try to have this merged and released in the near future.

@ewjoachim ewjoachim force-pushed the exception-swallowed-493 branch from 555d146 to c2588e3 Compare December 5, 2021 23:19
@github-actions
Copy link

github-actions bot commented Dec 5, 2021

Coverage report

The coverage rate went from 100.0% to 100.0% ➡️

The branch rate is 99.62%

100% of new lines are covered.

Diff Coverage details (click to unfold)

procrastinate/utils.py

100.0% of new lines are covered

procrastinate/worker.py

100.0% of new lines are covered

procrastinate/exceptions.py

100.0% of new lines are covered

@ewjoachim ewjoachim merged commit e094777 into master Dec 5, 2021
@ewjoachim ewjoachim deleted the exception-swallowed-493 branch December 5, 2021 23:28
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.

Exceptions swallowed in the listener and periodic_deferrer
2 participants