Przeglądaj źródła

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

dessant 9 lat temu
rodzic
commit
26bd630bdb
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      celery/events/__init__.py

+ 3 - 2
celery/events/__init__.py

@@ -332,8 +332,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))