"""Celery application and beat schedule.""" from celery import Celery from celery.schedules import crontab from app.core.config import get_settings settings = get_settings() celery_app = Celery( "slack_data_collector", broker=settings.REDIS_URL, backend=settings.REDIS_URL, include=["app.tasks.sync"], ) celery_app.conf.timezone = "UTC" celery_app.conf.beat_schedule = { "run-sync-for-all-teams-daily": { "task": "app.tasks.sync.run_sync_for_all_teams_task", "schedule": crontab(hour=2, minute=0), }, }