Kaynağa Gözat

Merge branch '3.0'

Ask Solem 12 yıl önce
ebeveyn
işleme
2f40d121a3
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      celery/app/task.py

+ 3 - 3
celery/app/task.py

@@ -267,9 +267,9 @@ class Task(object):
         if not was_bound:
             self.annotate()
 
-        from celery.utils.threads import LocalStack
-        self.request_stack = LocalStack()
-        self.request_stack.push(Context())
+            from celery.utils.threads import LocalStack
+            self.request_stack = LocalStack()
+            self.request_stack.push(Context())
 
         # PeriodicTask uses this to add itself to the PeriodicTask schedule.
         self.on_bound(app)