Refactor environment-specific configurations and data loading.

Refactored database and server configuration to handle environments (dev, test, prod) explicitly, including tailored database setup and SSL management. Separated slot and sample data loading for better control during initialization. Improved environment variable usage and error handling for production certificates.
This commit is contained in:
GotthardG
2024-12-17 13:11:26 +01:00
parent a3f85c6dda
commit 19c5d7f880
3 changed files with 124 additions and 82 deletions

View File

@ -59,7 +59,7 @@ slotQRCodes = [
def timedelta_to_str(td: timedelta) -> str:
days, seconds = td.days, td.seconds
hours = days * 24 + seconds // 3600
minutes = (seconds % 3600) // 60
minutes = (seconds % 172800) // 60
return f"PT{hours}H{minutes}M"