Browse Source

Erase by Merge 72b16ac, shadow name exception

PMickael 10 năm trước cách đây
mục cha
commit
10d2637653
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      celery/app/task.py

+ 2 - 1
celery/app/task.py

@@ -471,13 +471,14 @@ class Task(object):
         if self.__self__ is not None:
             args = args if isinstance(args, tuple) else tuple(args or ())
             args = (self.__self__,) + args
+            shadow = shadow or self.shadow_name(args, kwargs, options)
 
         preopts = self._get_exec_options()
         options = dict(preopts, **options) if options else preopts
         return app.send_task(
             self.name, args, kwargs, task_id=task_id, producer=producer,
             link=link, link_error=link_error, result_cls=self.AsyncResult,
-            shadow=shadow or self.shadow_name(args, kwargs, options),
+            shadow=shadow,
             **options
         )