mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
Dont handle redisqueue if bot decides to offline
This commit is contained in:
parent
ef9a97a03a
commit
3159b9c0f5
@ -38,6 +38,9 @@ class RedisQueue:
|
|||||||
await subscriber.subscribe(["discord-api-req"])
|
await subscriber.subscribe(["discord-api-req"])
|
||||||
count = 0
|
count = 0
|
||||||
while True:
|
while True:
|
||||||
|
if not self.bot.is_ready() or self.bot.is_closed():
|
||||||
|
await asyncio.sleep(0)
|
||||||
|
continue
|
||||||
reply = await subscriber.next_published()
|
reply = await subscriber.next_published()
|
||||||
request = json.loads(reply.value)
|
request = json.loads(reply.value)
|
||||||
resource = request["resource"]
|
resource = request["resource"]
|
||||||
|
Loading…
Reference in New Issue
Block a user