fix(backend): lazy-load PersonaAnalysisService in podcast mode, preserve PORT from Render

This commit is contained in:
ajaysi
2026-04-05 15:28:49 +05:30
parent bba56a1940
commit aa2317c359
4 changed files with 56 additions and 13 deletions

View File

@@ -39,9 +39,10 @@ class ProductionOptimizer:
def _set_production_env_vars(self) -> None:
"""Set production-specific environment variables."""
production_vars = {
# Note: PORT is NOT set here - it's provided by the deployment platform (e.g., Render)
# Don't override PORT as it must come from the environment
# Note: HOST is not set here - it's auto-detected by start_backend()
# Based on deployment environment (cloud vs local)
'PORT': '8000',
'RELOAD': 'false',
'LOG_LEVEL': 'INFO',
'DEBUG': 'false',