- Step 14: Brand enforcement service (font/color/logo replacement, WCAG contrast check, LLM prompt context) - Step 15: Enhanced outline & slide content generation with brand context, content summary, "no hallucination" instructions - Step 15b: LLM auto-fallback retry logic across providers (FALLBACK_LLM_PROVIDERS env) - Step 16: Redis/ARQ job queue — worker entry point, presentation & master deck workers, job status/SSE endpoints, graceful fallback to BackgroundTasks when Redis unavailable Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
656 B
Python
24 lines
656 B
Python
"""ARQ worker entry point.
|
|
|
|
Run with: python -m arq workers.main.WorkerSettings
|
|
"""
|
|
import os
|
|
|
|
from arq.connections import RedisSettings
|
|
|
|
from workers.master_deck_worker import parse_master_deck_task
|
|
from workers.presentation_worker import generate_presentation_task
|
|
|
|
|
|
def _get_redis_settings() -> RedisSettings:
|
|
url = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
|
|
return RedisSettings.from_dsn(url)
|
|
|
|
|
|
class WorkerSettings:
|
|
redis_settings = _get_redis_settings()
|
|
functions = [generate_presentation_task, parse_master_deck_task]
|
|
max_jobs = 5
|
|
job_timeout = 600 # 10 minutes
|
|
max_tries = 3
|
|
health_check_interval = 30
|