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
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
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
Member

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

@JeffBezanson JeffBezanson added the triage This should be discussed on a triage call label Feb 10, 2021
vtjnash added 2 commits March 18, 2021 16:18
This adds a convenience method to be able to essentially wrap an
arbitrary task in a try/catch/log block conveniently.
@vtjnash vtjnash added merge me PR is reviewed. Merge when all tests are passing and removed 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
Member

You guys went with errormonitor, huh?

@vtjnash
Copy link
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
Member

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

@simeonschaub simeonschaub removed the merge me PR is reviewed. Merge when all tests are passing label Apr 3, 2021
Keno pushed a commit that referenced this pull request Jun 5, 2024
Add `errormonitor(::Task)` method to monitor for Task failures
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.

5 participants