Основа из lab3
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
import uuid
|
||||
|
||||
|
||||
class Settings:
|
||||
def __init__(self) -> None:
|
||||
self.database_url = os.environ["DATABASE_URL"]
|
||||
self.session_ttl_seconds = int(os.environ.get("SESSION_TTL_SECONDS", "3600"))
|
||||
self.idempotency_ttl_seconds = int(os.environ.get("IDEMPOTENCY_TTL_SECONDS", "86400"))
|
||||
self.instance_id = os.environ.get("INSTANCE_ID") or uuid.uuid4().hex
|
||||
self.host = os.environ.get("APP_HOST", "0.0.0.0")
|
||||
self.port = int(os.environ.get("APP_PORT", "8080"))
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user