Skip to content

Commit 2aebae5

Browse files
authored
Bug Fix: Nested Chords Fail When Using django-celery-results with a Redis Backend (celery#9950)
* ~pass in app when calling GroupResult.restore in RedisBackend > on_chord_part_return * ~updated unit test to align with bug fix to RedisBackend
1 parent 26bee54 commit 2aebae5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

celery/backends/redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def on_chord_part_return(self, request, state, result,
540540
callback = maybe_signature(request.chord, app=app)
541541
total = int(chord_size_bytes) + totaldiff
542542
if readycount == total:
543-
header_result = GroupResult.restore(gid)
543+
header_result = GroupResult.restore(gid, app=app)
544544
if header_result is not None:
545545
# If we manage to restore a `GroupResult`, then it must
546546
# have been complex and saved by `apply_chord()` earlier.

t/unit/backends/test_redis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ def test_on_chord_part_return(
12851285
self.b.client.zrange.assert_not_called()
12861286
self.b.client.lrange.assert_not_called()
12871287
# Confirm that the `GroupResult.restore` mock was called
1288-
complex_header_result.assert_called_once_with(request.group)
1288+
complex_header_result.assert_called_once_with(request.group, app=self.b.app)
12891289
# Confirm that the callback was called with the `join()`ed group result
12901290
if supports_native_join:
12911291
expected_join = mock_result_obj.join_native

0 commit comments

Comments
 (0)