Selaa lähdekoodia

Fix additional issue #2225

Earlier commit with the same title missed one of the cases
causing the duplicate task_id argument error (i.e., when using
AMQP).  This commit addresses the issue.
Aneil Mallavarapu 10 vuotta sitten
vanhempi
commit
16760602cd
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      celery/backends/base.py

+ 2 - 2
celery/backends/base.py

@@ -357,8 +357,8 @@ class BaseBackend(object):
 
     def apply_chord(self, header, partial_args, group_id, body,
                     options={}, **kwargs):
-        options['task_id'] = group_id
-        result = header(*partial_args, **options or {})
+        fixed_options = dict((k,v) for k,v in options.items() if k!='task_id')
+        result = header(*partial_args, task_id=group_id, **fixed_options or {})
         self.fallback_chord_unlock(group_id, body, **kwargs)
         return result