prevent 100% cpu usage

This commit is contained in:
CEF Server 2024-08-27 23:28:07 +00:00
parent 6c27007d3c
commit 83404812d0

View file

@ -76,7 +76,7 @@ class ErgoClient:
async with redis.pubsub() as pubsub: async with redis.pubsub() as pubsub:
await pubsub.psubscribe("user.*") await pubsub.psubscribe("user.*")
while True: while True:
message = await pubsub.get_message(ignore_subscribe_messages=True) message = await pubsub.get_message(ignore_subscribe_messages=True, timeout=None)
try: try:
await self.handleUserMessage(message) await self.handleUserMessage(message)
except Exception as e: except Exception as e: