ProspectIQ / celery_app.py
praneelchettys's picture
Replace main with mobile-friendly ProspectIQ codebase
5bcd5ab
Raw
History Blame Contribute Delete
553 Bytes
import os
import sys
from dotenv import load_dotenv
load_dotenv()
# Add the project root to the Python path so Celery can find the 'services' module
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
from celery import Celery
redis_url = os.environ.get("REDIS_URL", "redis://127.0.0.1:6379/0")
broker_url = os.environ.get("CELERY_BROKER_URL", redis_url)
backend_url = os.environ.get("CELERY_RESULT_BACKEND", redis_url)
celery_app = Celery(
"prospectiq_tasks",
broker=broker_url,
backend=backend_url,
include=["tasks"]
)