# core/celery_app.py
from celery import Celery
from core.config import settings

celery_app = Celery(
    "worker",
    broker=settings.REDIS_URL,
    backend=settings.REDIS_URL,
    include=[
        "modules.auth.tasks",
        "modules.admin.tasks",
        "modules.calendar.tasks",  # Add calendar tasks
    ],
)

# Optional: Configure Celery Beat if you need periodic tasks later
# celery_app.conf.beat_schedule = {
#     'check-something-every-5-minutes': {
#         'task': 'your_app.tasks.check_something',
#         'schedule': timedelta(minutes=5),
#     },
# }
celery_app.conf.timezone = "UTC"  # Recommended to use UTC
