-
Notifications
You must be signed in to change notification settings - Fork 206
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
Ensure triggering of callback in chord #397
base: main
Are you sure you want to change the base?
Conversation
If one task for whatever reason is executed twice the callback is never triggered because the chord will be deleted and the before the last task is executed. The last task then will raise a warning that the chord cant be found.
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 makes sense, you could consider refrasing the warning so it indicates why it's emitted instead of what broke. Something like "Chord %s executed more tasks than expected"
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.
beside the review comments, we need to make sure the CI is green
The tests seem to be wrong. The counter goes to 0 but the group was not done. |
fixing unit test
chord_counter.refresh_from_db() | ||
assert chord_counter.count == 1 |
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.
I don't think this is correct, we have a header of 2, 1 is done, the other fails.
If a task in the header fails the chord is done and the callback is not called.
If this is the case, a ChordCounter object will remain in the db for every failed chord.
If one task for whatever reason is executed twice the callback is never triggered because the chord will be deleted before the last task is executed. The last task will then raise a warning that the chord can't be found.