Ask Solem 9 years ago
parent
commit
41cb188783
2 changed files with 4 additions and 5 deletions
  1. 2 3
      celery/backends/base.py
  2. 2 2
      celery/canvas.py

+ 2 - 3
celery/backends/base.py

@@ -358,7 +358,7 @@ class BaseBackend(object):
 
     def apply_chord(self, header, partial_args, group_id, body,
                     options={}, **kwargs):
-        fixed_options = {k: v for k,v in options.items() if k!='task_id'}
+        fixed_options = {k: v for k, v in items(options) 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
@@ -536,11 +536,10 @@ class KeyValueStoreBackend(BaseBackend):
                           result=None, options={}, **kwargs):
         self.save_group(group_id, self.app.GroupResult(group_id, result))
 
-        fixed_options = {k: v for k,v in options.items() if k != 'task_id'}
+        fixed_options = {k: v for k, v in items(options) if k != 'task_id'}
 
         return header(*partial_args, task_id=group_id, **fixed_options or {})
 
-
     def on_chord_part_return(self, task, state, result, propagate=None):
         if not self.implements_incr:
             return

+ 2 - 2
celery/canvas.py

@@ -407,8 +407,8 @@ class chain(Signature):
 
     def freeze(self, _id=None, group_id=None, chord=None, root_id=None):
         _, results = self._frozen = self.prepare_steps(
-            self.args, self.tasks, root_id, None, self.app, _id, group_id, chord,
-            clone=False,
+            self.args, self.tasks, root_id, None,
+            self.app, _id, group_id, chord, clone=False,
         )
         return results[-1]