"""Celery application for background processing."""

from celery import Celery

from config import settings

celery_app = Celery(
    "seg_server",
    broker=settings.redis_url,
    backend=settings.redis_url,
    include=["worker_tasks"],
)

celery_app.conf.update(
    task_serializer="json",
    result_serializer="json",
    accept_content=["json"],
    timezone="Asia/Shanghai",
    enable_utc=True,
    task_track_started=True,
)
