feat: improve generation analytics and maintenance

This commit is contained in:
2026-04-19 09:03:40 +08:00
parent d5a173aa0d
commit 5318de670f
21 changed files with 1155 additions and 57 deletions

View File

@@ -62,12 +62,20 @@ class Settings(BaseSettings):
False,
description="Enable local deterministic demo providers for portfolio demos",
)
story_audio_cache_dir: str = Field(
"storage/audio",
description="Directory for cached story audio files",
)
# Celery (Redis)
story_audio_cache_dir: str = Field(
"storage/audio",
description="Directory for cached story audio files",
)
story_audio_cache_ttl_days: int = Field(
30,
description="TTL in days before cached story audio is pruned",
)
generation_job_stale_minutes: int = Field(
60,
description="Minutes before a running generation job is considered stale",
)
# Celery (Redis)
celery_broker_url: str = Field("redis://localhost:6379/0")
celery_result_backend: str = Field("redis://localhost:6379/0")