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

progress: would like to indicate error before completion #159

Closed
virtuald opened this issue Apr 21, 2021 · 0 comments · Fixed by #160
Closed

progress: would like to indicate error before completion #159

virtuald opened this issue Apr 21, 2021 · 0 comments · Fixed by #160

Comments

@virtuald
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Let's say I have 100 pieces of a task, each piece takes 10 seconds to accomplish, and I can do them concurrently. If one of them fails, I'd like to tell the user that one of them has failed, but the others are still making progress.

Describe the solution you'd like

It would probably be best to let the tracker continue, and update the tracker message to indicate that an error occurred. Currently Tracker.Message is public, but (even though not documented as such) probably shouldn't be written after a tracker is started because string assignment isn't guaranteed to be atomic (https://groups.google.com/g/golang-nuts/c/UWJlS8mPTlM).

Adding a mechanism to update the tracker message (and/or color) would work nicely. The user would still need to finalize the tracker via MarkAsErrored. What do you think?

... yes, I know I added MarkAsErrored, but clearly I didn't actually think through what I really wanted before doing that. :)

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 a pull request may close this issue.

1 participant