ЛР 2: Valkey как кэш сессий с обходом при сбое

This commit is contained in:
2026-11-03 04:06:04 +03:00
parent f4087c1672
commit 7b0a6aea9b
7 changed files with 119 additions and 9 deletions
+4 -1
View File
@@ -18,4 +18,7 @@ DB_POOL_MAX = int(os.environ.get("DB_POOL_MAX", "10"))
DB_CONNECT_TIMEOUT = float(os.environ.get("DB_CONNECT_TIMEOUT", "5"))
DB_COMMAND_TIMEOUT = float(os.environ.get("DB_COMMAND_TIMEOUT", "5"))
MIGRATIONS_DIR = Path(os.environ.get("MIGRATIONS_DIR", Path(__file__).resolve().parent.parent / "migrations"))
MIGRATIONS_DIR = Path(os.environ.get("MIGRATIONS_DIR", Path(__file__).resolve().parent.parent / "migrations"))
CACHE_URL = _read_secret("CACHE_URL_FILE", "CACHE_URL")
CACHE_TTL_SECONDS = int(os.environ.get("CACHE_TTL_SECONDS", "60"))
CACHE_TIMEOUT = float(os.environ.get("CACHE_TIMEOUT", "0.5"))