Explorar o código

Task.bind should always set backend

Ask Solem %!s(int64=11) %!d(string=hai) anos
pai
achega
f3497541b2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      celery/app/task.py

+ 2 - 2
celery/app/task.py

@@ -294,14 +294,14 @@ class Task(object):
         was_bound, self.__bound__ = self.__bound__, True
         self._app = app
         conf = app.conf
+        self._exec_options = None  # clear option cache
 
         for attr_name, config_name in self.from_config:
             if getattr(self, attr_name, None) is None:
                 setattr(self, attr_name, conf[config_name])
         if self.accept_magic_kwargs is None:
             self.accept_magic_kwargs = app.accept_magic_kwargs
-        if self.backend is None:
-            self.backend = app.backend
+        self.backend = app.backend
 
         # decorate with annotations from config.
         if not was_bound: