14 lines
354 B
Python
14 lines
354 B
Python
# 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"}
|