26 lines
548 B
Python
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"},
|
||
|
}
|
||
|
|