849eb0ff48
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
614 B
Python
28 lines
614 B
Python
from celery import Celery
|
|
from celery.schedules import crontab
|
|
|
|
from app.config import settings
|
|
|
|
celery_app = Celery(
|
|
"meeting_protocol",
|
|
broker=settings.redis_url,
|
|
backend=settings.redis_url,
|
|
)
|
|
|
|
celery_app.conf.update(
|
|
task_serializer="json",
|
|
accept_content=["json"],
|
|
result_serializer="json",
|
|
timezone="UTC",
|
|
enable_utc=True,
|
|
task_track_started=True,
|
|
beat_schedule={
|
|
"cleanup-old-data": {
|
|
"task": "app.tasks.cleanup.cleanup_old_data",
|
|
"schedule": crontab(hour=3, minute=0),
|
|
},
|
|
},
|
|
)
|
|
|
|
celery_app.autodiscover_tasks(["app.tasks"])
|