AI_Virtual_Wardrobe / app /workers /celery_app.py
mata01's picture
Initialize production-grade FastAPI backend with models, routes, celery workers, and test suite
b18b789
Raw
History Blame Contribute Delete
516 Bytes
from celery import Celery
from app.core.config import settings
celery_app = Celery(
"wardrobe_tasks",
broker=settings.redis_url,
backend=settings.redis_url
)
celery_app.conf.update(
task_serializer="json",
accept_content=["json"],
result_serializer="json",
timezone="Asia/Ho_Chi_Minh",
enable_utc=True,
task_track_started=True,
task_time_limit=300, # 5 minutes max per AI task
)
# Autodiscover tasks from app.workers package
celery_app.autodiscover_tasks(["app.workers"])