feat: derive POSTGRES_DB and Redis prefix from DEPLOY_STAGE for pipeline isolation

This commit is contained in:
Celes Renata
2026-04-20 01:33:14 +00:00
parent d64ce82649
commit 8f67d326c9
2 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
"""Redis key conventions and queue abstractions."""
import os
# --- Key prefixes ---
PREFIX = "stonks"
_STAGE = os.getenv("DEPLOY_STAGE", "")
PREFIX = f"stonks:{_STAGE}" if _STAGE else "stonks"
# Distributed locks
LOCK_PREFIX = f"{PREFIX}:lock"