فهرست منبع

Fix issue with timer starting after stop() is called. Now it doesn't start in this situation.

Ionel Cristian Mărieș 11 سال پیش
والد
کامیت
c87b41158a
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      celery/utils/timer2.py

+ 1 - 1
celery/utils/timer2.py

@@ -86,8 +86,8 @@ class Timer(threading.Thread):
             os._exit(1)
 
     def stop(self):
+        self._is_shutdown.set()
         if self.running:
-            self._is_shutdown.set()
             self._is_stopped.wait()
             self.join(THREAD_TIMEOUT_MAX)
             self.running = False