-
Notifications
You must be signed in to change notification settings - Fork 91
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
Support Ignored State #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great - appreciate you breaking everything up by commit and also the README improvements! 👏 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great.
My preference is against a solution that requires updating the state after being ignored. But I understand that it might not be doable otherwise :)
def task_postrun_handler(**kwargs): | ||
"""Runs after a task has finished. This will update the result backend to include the IGNORED result state. | ||
|
||
Necessary for HTTP to properly receive ignored task event.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does WS get an IGNORED state without this post handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the WS receives the IGNORED state from it's own post handler, this is necessary purely to update the state on the backend so that the AsyncResult in the HTTP view can be notified that it's been ignored, as the point of the IGNORED
state is to not save anything to the backend.
Sorry. Might be a while before I test it. But however it works, it shouldn't block this PR. |
Part 3 of 4 in the saga that is #54. Significant changes in this PR:
IGNORED
state support to Progress.get_info().onIgnored
funtion to JS (as well as the associated color).If a user specifies an error message (i.e. doing
raise Ignore('lol')
), it will use the error message instead like so:barColors
, taking the form of a table.All that's left from the aforementioned issue is to investigate the behavior of
store_errors_even_if_ignored
, although I believe Omar was going to take a crack at that. Suggestions welcome.