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

Ensure triggering of callback in chord #397

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion django_celery_results/backends/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ def on_chord_part_return(self, request, state, result, **kwargs):
else:
# Last task in the chord header has finished
call_callback = True
chord_counter.delete()

if call_callback:
deps = chord_counter.group_result(app=self.app)
Expand All @@ -276,6 +275,10 @@ def on_chord_part_return(self, request, state, result, **kwargs):
callback=callback,
group_result=deps
)
chord_counter.delete()
s-jakob marked this conversation as resolved.
Show resolved Hide resolved
else:
logger.warning("ChordCounter for Group %s 0 "
"but not ready yet.", gid)


def trigger_callback(app, callback, group_result):
Expand Down
Loading