瀏覽代碼

Chord join must have a timeout (set to 3.0 to be safe, but can probably be lower)

Ask Solem 11 年之前
父節點
當前提交
13656aa671
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      celery/app/builtins.py
  2. 1 1
      celery/backends/base.py

+ 1 - 1
celery/app/builtins.py

@@ -96,7 +96,7 @@ def add_unlock_chord_task(app):
             callback = signature(callback, app=app)
             callback = signature(callback, app=app)
             try:
             try:
                 with allow_join_result():
                 with allow_join_result():
-                    ret = j(propagate=propagate)
+                    ret = j(timeout=3.0, propagate=propagate)
             except Exception as exc:
             except Exception as exc:
                 try:
                 try:
                     culprit = next(deps._failed_join_report())
                     culprit = next(deps._failed_join_report())

+ 1 - 1
celery/backends/base.py

@@ -508,7 +508,7 @@ class KeyValueStoreBackend(BaseBackend):
             j = deps.join_native if deps.supports_native_join else deps.join
             j = deps.join_native if deps.supports_native_join else deps.join
             try:
             try:
                 with allow_join_result():
                 with allow_join_result():
-                    ret = j(propagate=propagate)
+                    ret = j(timeout=3.0, propagate=propagate)
             except Exception as exc:
             except Exception as exc:
                 try:
                 try:
                     culprit = next(deps._failed_join_report())
                     culprit = next(deps._failed_join_report())