コード例 #1
0
ファイル: events.py プロジェクト: maximbo/celery
 def capture(self, limit=None):
     """Open up a consumer capturing events. This has to be running
     in the main process, and it will never stop unless forced"""
     consumer = EventConsumer(self.connection)
     consumer.register_callback(self._receive)
     it = consumer.iterconsume(limit=limit)
     while True:
         it.next()
コード例 #2
0
ファイル: events.py プロジェクト: kmike/celery
    def capture(self, limit=None):
        """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`.

        """
        consumer = EventConsumer(self.connection)
        consumer.register_callback(self._receive)
        it = consumer.iterconsume(limit=limit)
        while True:
            it.next()
コード例 #3
0
ファイル: __init__.py プロジェクト: jokar/minion
 def consumer(self):
     consumer = EventConsumer(self.connection)
     consumer.register_callback(self._receive)
     return consumer