Tiktok-Talent-Info/celery_app.py
2025-02-07 19:18:35 +08:00

26 lines
548 B
Python

# from celery import Celery
# celery_app = Celery(
# "tasks",
# broker="redis://localhost:6379/0", # Redis as broker
# backend="redis://localhost:6379/0", # Redis for storing results
# )
# celery_app.conf.task_routes = {
# "tasks.*": {"queue": "default"},
# }
from celery import Celery
celery_app = Celery(
"tasks",
broker="redis://localhost:6379/0",
backend="redis://localhost:6379/0",
include=["tasks"] # ✅ Prevents import issues
)
celery_app.conf.task_routes = {
"tasks.*": {"queue": "default"},
}