Преглед на файлове

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

Ask Solem преди 11 години
родител
ревизия
368b8f2e76
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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