Create celery_worker.py
This commit is contained in:
committed by
GitHub
parent
dff0be2b1d
commit
527c6c86ff
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from celery import Celery
|
||||
from .config import settings
|
||||
|
||||
celery = Celery("document_processor", broker=settings.redis_url, backend=settings.redis_url)
|
||||
|
||||
celery.conf.task_routes = {
|
||||
"app.tasks.*": {"queue": "default"},
|
||||
}
|
||||
|
||||
@celery.task
|
||||
def test_task():
|
||||
return "Celery is working!"
|
||||
Reference in New Issue
Block a user