Ver Fonte

Fixes problem with anon subtasks

Ask Solem há 12 anos atrás
pai
commit
9bbb5c1a60
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      celery/canvas.py

+ 2 - 1
celery/canvas.py

@@ -12,6 +12,7 @@
 from __future__ import absolute_import
 from __future__ import absolute_import
 
 
 from copy import deepcopy
 from copy import deepcopy
+from functools import partial as _partial
 from operator import itemgetter
 from operator import itemgetter
 from itertools import chain as _chain
 from itertools import chain as _chain
 
 
@@ -217,7 +218,7 @@ class Signature(dict):
         try:
         try:
             return self.type.apply_async
             return self.type.apply_async
         except KeyError:
         except KeyError:
-            return current_app.send_task
+            return _partial(current_app.send_task, self['task'])
     task = _getitem_property('task')
     task = _getitem_property('task')
     args = _getitem_property('args')
     args = _getitem_property('args')
     kwargs = _getitem_property('kwargs')
     kwargs = _getitem_property('kwargs')