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:
|
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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue