mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
sort of a fix
This commit is contained in:
parent
75a865287f
commit
97b2fe1880
|
@ -46,7 +46,11 @@ class MessageQueue:
|
|||
status = await send_to_discord_webhook(msg, webhook_url)
|
||||
if status[0] < 2:
|
||||
logger.debug("Sending message succeeded")
|
||||
self._queue.remove(msg)
|
||||
try:
|
||||
self._queue.remove(msg)
|
||||
except ValueError:
|
||||
# For the love of god I cannot figure why can it return ValueError: list.remove(x): x not in list, however considering it's not in the list, somehow, anymore we can just not care about it I guess
|
||||
pass
|
||||
logger.debug("Current rate limit time: {}".format(status[1]))
|
||||
if status[1] is not None:
|
||||
await asyncio.sleep(float(status[1])) # note, the timer on the last request won't matter that much since it's separate task and for the time of sleep it will give control to other tasks
|
||||
|
|
Loading…
Reference in a new issue