ImageProcessor_MainServer/app/celery_worker_for_main.py

22 lines
449 B
Python

from celery import Celery
import os
# Redis URL 설정
redis_url = os.getenv("REDIS_URL", "redis://redis:6379/0")
# FastAPI 서버용 Celery 앱 (태스크 등록 없이 전송만)
celery_app = Celery(
"main_server",
broker=redis_url,
backend=redis_url,
)
# Celery 설정
celery_app.conf.update(
task_serializer='json',
accept_content=['json'],
result_serializer='json',
timezone='Asia/Seoul',
enable_utc=True,
)