fix(pterodactyl): use time.sleep instead

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

View file

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