prevent 100% cpu usage
This commit is contained in:
parent
6c27007d3c
commit
83404812d0
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class ErgoClient:
|
|||
async with redis.pubsub() as pubsub:
|
||||
await pubsub.psubscribe("user.*")
|
||||
while True:
|
||||
message = await pubsub.get_message(ignore_subscribe_messages=True)
|
||||
message = await pubsub.get_message(ignore_subscribe_messages=True, timeout=None)
|
||||
try:
|
||||
await self.handleUserMessage(message)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue