Files
flowsint/flowsint-api/app/core/celery.py
T
2025-06-20 11:36:53 +02:00

24 lines
545 B
Python

from celery import Celery
from app.core.config import settings
celery = Celery(
"flowsint",
broker=settings.CELERY_BROKER_URL,
backend=settings.CELERY_RESULT_BACKEND,
include=[
"app.tasks.event",
"app.tasks.transform",
]
)
celery.conf.update(
task_serializer="json",
accept_content=["json"],
result_serializer="json",
timezone="UTC",
enable_utc=True,
task_track_started=True,
task_time_limit=3600, # 1 hour
worker_max_tasks_per_child=1000,
worker_prefetch_multiplier=1
)