Selaa lähdekoodia

Task decorator should not be lazy if app already finalized. Closes #1571

Ask Solem 11 vuotta sitten
vanhempi
commit
368b8f2e76
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      celery/app/base.py

+ 1 - 1
celery/app/base.py

@@ -162,7 +162,7 @@ class Celery(object):
                         task = filter(task)
                     return task
 
-                if opts.get('_force_evaluate'):
+                if self.finalized or opts.get('_force_evaluate'):
                     ret = self._task_from_fun(fun, **opts)
                 else:
                     # return a proxy object that is only evaluated on first use