Browse Source

Renames module celery.task.chord -> celery.task.chords

Ask Solem 14 năm trước cách đây
mục cha
commit
27c7815901
2 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 1 1
      celery/task/__init__.py
  2. 2 1
      celery/task/chords.py

+ 1 - 1
celery/task/__init__.py

@@ -4,7 +4,7 @@ import warnings
 from celery.app import app_or_default
 from celery.task.base import Task, PeriodicTask
 from celery.task.sets import TaskSet, subtask
-from celery.task.chord import chord
+from celery.task.chords import chord
 from celery.task.control import discard_all
 
 __all__ = ["Task", "TaskSet", "PeriodicTask", "subtask",

+ 2 - 1
celery/task/chord.py → celery/task/chords.py

@@ -11,7 +11,8 @@ def _unlock_chord(setid, callback, interval=1, max_retries=None):
     if result.ready():
         subtask(callback).delay(result.join())
         result.delete()
-    _unlock_chord.retry(countdown=interval, max_retries=max_retries)
+    else:
+        _unlock_chord.retry(countdown=interval, max_retries=max_retries)
 
 
 class Chord(current_app.Task):