This commit is contained in:
parent
2a188004c1
commit
c20c6bef33
|
|
@ -17,7 +17,7 @@ class Settings(BaseSettings):
|
|||
results_dir: str = Field(default="./results")
|
||||
|
||||
# Redis configuration for task queue
|
||||
redis_url: str = Field(default="redis://localhost:6379")
|
||||
redis_url: str = Field(default="redis://localhost:6379", validation_alias="REDIS_URL")
|
||||
|
||||
# API Keys
|
||||
openai_api_key: Optional[str] = None
|
||||
|
|
|
|||
|
|
@ -27,6 +27,17 @@ app = FastAPI(
|
|||
redoc_url="/redoc",
|
||||
)
|
||||
|
||||
@app.on_event("startup")
|
||||
async def startup_event():
|
||||
"""Log configuration on startup"""
|
||||
redis_url = settings.redis_url
|
||||
# Mask password if present
|
||||
if "@" in redis_url:
|
||||
masked_url = redis_url.split("@")[1]
|
||||
logger.info(f"Redis configured with host: {masked_url}")
|
||||
else:
|
||||
logger.info(f"Redis configured with URL: {redis_url}")
|
||||
|
||||
# Setup CORS
|
||||
setup_cors(app)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue