Parcourir la source

timer2: Set self.running=False in stop() so it won't try to join again on subsequent calls.

Ask Solem il y a 14 ans
Parent
commit
71dfa2970f
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      celery/utils/timer2.py

+ 1 - 0
celery/utils/timer2.py

@@ -167,6 +167,7 @@ class Timer(Thread):
             self._shutdown.set()
             self._stopped.wait()
             self.join(1e100)
+            self.running = False
 
     def enter(self, entry, eta, priority=None):
         if not self.running: