mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-07-18 00:02:55 -04:00
Compare commits
No commits in common. "9ba5c13702509ec56a08bc7e4edcbbe18480994c" and "30e241babe1c0d28bc27ddb9043b545f2782b36f" have entirely different histories.
9ba5c13702
...
30e241babe
@ -198,8 +198,8 @@ async def handle_pubsub_messages(channel: aioredis.client.PubSub):
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
async with async_timeout.timeout(60):
|
async with async_timeout.timeout(1):
|
||||||
message = await channel.get_message(ignore_subscribe_messages=True, timeout=30)
|
message = await channel.get_message(ignore_subscribe_messages=True)
|
||||||
if message is not None:
|
if message is not None:
|
||||||
# Parse message
|
# Parse message
|
||||||
data_json = json.loads(message['data'].decode('utf-8'))
|
data_json = json.loads(message['data'].decode('utf-8'))
|
||||||
@ -244,7 +244,7 @@ async def handle_pubsub_messages(channel: aioredis.client.PubSub):
|
|||||||
else:
|
else:
|
||||||
dockerapi.logger.error("Unknwon PubSub recieved - %s" % json.dumps(data_json))
|
dockerapi.logger.error("Unknwon PubSub recieved - %s" % json.dumps(data_json))
|
||||||
|
|
||||||
await asyncio.sleep(0.0)
|
await asyncio.sleep(0.01)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user