fix(pterodactyl): use time.sleep instead
All checks were successful
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 20s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 26s

This commit is contained in:
Seaswimmer 2024-03-01 14:56:44 -05:00
parent b775439967
commit b6819192b0
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -1,5 +1,6 @@
import asyncio
import json
import time
from typing import Mapping, Optional
import discord
@ -49,7 +50,7 @@ class Pterodactyl(commands.Cog):
self.task.cancel()
if self.retry_counter < 5:
self.retry_counter += 1
asyncio.sleep(5 * self.retry_counter)
time.sleep(5 * self.retry_counter)
self.task = self.get_task()
else:
logger.info("Retry limit reached. Stopping task.")