first commit
This commit is contained in:
15
backend/app/worker.py
Normal file
15
backend/app/worker.py
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
from celery import Celery
|
||||
import os
|
||||
|
||||
redis_url = os.getenv("REDIS_URL", "redis://redis:6379/0")
|
||||
|
||||
celery_app = Celery(
|
||||
"worker",
|
||||
broker=redis_url,
|
||||
backend=redis_url
|
||||
)
|
||||
|
||||
@celery_app.task
|
||||
def test_task():
|
||||
return "Worker is running"
|
||||
Reference in New Issue
Block a user