dynamic config reloading

This commit is contained in:
2026-01-28 16:13:32 -05:00
parent 1fbea7e701
commit a1ff38424b
6 changed files with 131 additions and 80 deletions

View File

@@ -1,5 +1,5 @@
import aiohttp
from config import FFSCOUTER_KEY
import config
async def fetch_batch_stats(ids: list[int]):
#Fetches predicted stats for a list of Torn IDs in a single FFScouter request.
@@ -9,7 +9,7 @@ async def fetch_batch_stats(ids: list[int]):
return {}
ids_str = ",".join(map(str, ids))
url = f"https://ffscouter.com/api/v1/get-stats?key={FFSCOUTER_KEY}&targets={ids_str}"
url = f"https://ffscouter.com/api/v1/get-stats?key={config.FFSCOUTER_KEY}&targets={ids_str}"
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp: