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

RFC: Add detach(::Task) method to monitor for Task failures #39518

Merged
merged 2 commits into from Apr 2, 2021

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Feb 4, 2021

We have a common problem where some background Task might fail, and we want to know about it. There might be additional opportunities to also restart it and such, but just logging seems to be the most common desire throughout the code (for debugging).

Copy link
Sponsor Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

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

I am a huge fan of this. It almost makes me want to introduce @detach and require the use of @sync for @async.

@JeffBezanson
Copy link
Sponsor Member

Big 👍 Only question is the name --- on triage we discussed using something like monitor instead.

@JeffBezanson JeffBezanson added the status:triage This should be discussed on a triage call label Feb 10, 2021
This adds a convenience method to be able to essentially wrap an
arbitrary task in a try/catch/log block conveniently.
@vtjnash vtjnash added status:merge me PR is reviewed. Merge when all tests are passing and removed status:triage This should be discussed on a triage call labels Mar 18, 2021
@vtjnash vtjnash merged commit 754aada into master Apr 2, 2021
@vtjnash vtjnash deleted the jn/detached-Task branch April 2, 2021 03:22
@StefanKarpinski
Copy link
Sponsor Member

You guys went with errormonitor, huh?

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Apr 2, 2021

It is not too late to rename, we've still got time until we branch. But as they say, the best way to get review is to merge :P

@StefanKarpinski
Copy link
Sponsor Member

What about adding a keyword argument to the Task constructor instead?

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.

None yet

5 participants