Spaces:
Sleeping
Sleeping
| 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"] | |
| ) | |