Browse Source

cosmetics

Ask Solem 12 years ago
parent
commit
cb54263f21
2 changed files with 3 additions and 5 deletions
  1. 1 2
      celery/app/builtins.py
  2. 2 3
      celery/canvas.py

+ 1 - 2
celery/app/builtins.py

@@ -367,8 +367,7 @@ def add_chord_task(app):
                 body.options['group_id'] = group_id
             [body.link(s) for s in options.pop('link', [])]
             [body.link_error(s) for s in options.pop('link_error', [])]
-            callback_id = body.options.get('task_id') or task_id or uuid()
-            body_result = body._freeze(callback_id)
+            body_result = body._freeze(task_id)
             parent = super(Chord, self).apply_async((header, body, args),
                                                     kwargs, **options)
             body_result.parent = parent

+ 2 - 3
celery/canvas.py

@@ -477,14 +477,13 @@ class chord(Signature):
     def type(self):
         return self._type or self.tasks[0].type.app.tasks['celery.chord']
 
-    def __call__(self, body=None, **kwargs):
+    def __call__(self, body=None, task_id=None, **kwargs):
         _chord = self.type
         body = (body or self.kwargs['body']).clone()
         kwargs = dict(self.kwargs, body=body, **kwargs)
         if _chord.app.conf.CELERY_ALWAYS_EAGER:
             return self.apply((), kwargs)
-        callback_id = body.options.get('task_id') or uuid()
-        res = body._freeze(callback_id)
+        res = body._freeze(task_id)
         parent = _chord(**kwargs)
         res.parent = parent
         return res