Bläddra i källkod

mention that event capturing can be stopped by setting should_stop to True

dessant 9 år sedan
förälder
incheckning
c636e19c2e
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      celery/events/__init__.py

+ 3 - 2
celery/events/__init__.py

@@ -358,8 +358,9 @@ class EventReceiver(ConsumerMixin):
     def capture(self, limit=None, timeout=None, wakeup=True):
         """Open up a consumer capturing events.
 
-        This has to run in the main process, and it will never
-        stop unless forced via :exc:`KeyboardInterrupt` or :exc:`SystemExit`.
+        This has to run in the main process, and it will never stop
+        unless :attr:`EventDispatcher.should_stop` is set to True, or
+        forced via :exc:`KeyboardInterrupt` or :exc:`SystemExit`.
 
         """
         return list(self.consume(limit=limit, timeout=timeout, wakeup=wakeup))