first commit
This commit is contained in:
13
utils/celery_utils.py
Normal file
13
utils/celery_utils.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# utils/celery_utils.py
|
||||
from celery import Celery
|
||||
from config.setting import CELERY_BROKER_URL, CELERY_RESULT_BACKEND
|
||||
|
||||
# Define and export the single Celery app instance
|
||||
celery_app = Celery(
|
||||
"ocr_tasks", broker=CELERY_BROKER_URL, backend=CELERY_RESULT_BACKEND
|
||||
)
|
||||
|
||||
|
||||
@celery_app.task(name="health_check")
|
||||
def health_check():
|
||||
return {"status": "ok"}
|
||||
Reference in New Issue
Block a user