fix: update RateLimiter settings and load Discord webhook URL from environment
This commit is contained in:
@@ -38,8 +38,8 @@ except ImportError:
|
||||
|
||||
load_dotenv()
|
||||
|
||||
# Discord webhook for notifications
|
||||
DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/1332864106750939168/6y6MgFhHLX0-BnL2M3hXnt2vJsue7Q2Duf_HjZenHNlNj7sxQr4lqxrPVJnJWf7KVAm2"
|
||||
# Discord webhook for notifications (load from environment)
|
||||
DISCORD_WEBHOOK_URL = os.getenv("DWH_URI", "")
|
||||
|
||||
# Configuration - using environment variables
|
||||
PG_CONFIG = {
|
||||
@@ -496,13 +496,6 @@ async def fetch_latest_dump_info() -> Optional[Dict[str, Any]]:
|
||||
dumps.sort(key=lambda x: parse_date_safe(x.get("date", datetime.min)), reverse=True)
|
||||
latest = dumps[0]
|
||||
|
||||
# Handle type issue with strftime
|
||||
if isinstance(latest["date"], datetime):
|
||||
formatted_date = latest["date"].strftime("%Y-%m-%d %H:%M:%S")
|
||||
else:
|
||||
formatted_date = "Unknown date"
|
||||
|
||||
print(f"Latest dump: {latest['filename']} ({formatted_date})")
|
||||
return latest
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user