Gritty_dev
7 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
19 additions and
19 deletions
-
src/socketio/async_aiopika_manager.py
-
src/socketio/kombu_manager.py
|
|
|
@ -101,15 +101,15 @@ class AsyncAioPikaManager(AsyncPubSubManager): # pragma: no cover |
|
|
|
raise asyncio.CancelledError() |
|
|
|
|
|
|
|
async def _listen(self): |
|
|
|
retry_sleep = 1 |
|
|
|
while True: |
|
|
|
try: |
|
|
|
async with (await self._connection()) as connection: |
|
|
|
channel = await self._channel(connection) |
|
|
|
await channel.set_qos(prefetch_count=1) |
|
|
|
exchange = await self._exchange(channel) |
|
|
|
queue = await self._queue(channel, exchange) |
|
|
|
|
|
|
|
retry_sleep = 1 |
|
|
|
while True: |
|
|
|
try: |
|
|
|
async with queue.iterator() as queue_iter: |
|
|
|
async for message in queue_iter: |
|
|
|
async with message.process(): |
|
|
|
|
|
|
|
@ -115,10 +115,10 @@ class KombuManager(PubSubManager): # pragma: no cover |
|
|
|
break |
|
|
|
|
|
|
|
def _listen(self): |
|
|
|
reader_queue = self._queue() |
|
|
|
retry_sleep = 1 |
|
|
|
while True: |
|
|
|
try: |
|
|
|
reader_queue = self._queue() |
|
|
|
with self._connection() as connection: |
|
|
|
with connection.SimpleQueue(reader_queue) as queue: |
|
|
|
while True: |
|
|
|
|