Skip to content

Commit

Permalink
flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Aug 12, 2015
1 parent c30dc0b commit 41cb188
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions celery/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def fallback_chord_unlock(self, group_id, body, result=None,

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
Expand Down Expand Up @@ -536,11 +536,10 @@ def _apply_chord_incr(self, header, partial_args, group_id, body,
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
Expand Down
4 changes: 2 additions & 2 deletions celery/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ def run(self, args=(), kwargs={}, group_id=None, chord=None,

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]

Expand Down

0 comments on commit 41cb188

Please sign in to comment.