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

Allow custom context managers to see task errors #165

Merged
merged 3 commits into from
Jun 18, 2020
Merged

Allow custom context managers to see task errors #165

merged 3 commits into from
Jun 18, 2020

Conversation

thomasst
Copy link
Member

Reformatted & fixed conflicts from #139 (thanks @igor47).

igor47 and others added 3 commits August 8, 2019 23:22
if the task fails, we should get a traceback in our context managers
we use user-specified context managers to wrap `self._execute_forked`
but that function always catches all exceptions. this means that our
`__exit__` function always thinks the tasks raised no error, and so do
not necesserily perform proper cleanup.

here, we move the context-manager wrapping closer to where we invoke the
function. the downside is that, if we swallow exceptions in the context
manager, we won't get retry logic, which i think is an acceptable
tradeoff
Fix conflicts and style
@thomasst thomasst self-assigned this Jun 18, 2020
@thomasst thomasst merged commit dbe549a into master Jun 18, 2020
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.

2 participants