Files
Meeting_Assistant/celery_worker.py
beabigegg df5411e44c OK
2025-11-13 08:18:15 +08:00

22 lines
542 B
Python

# This monkey-patching is crucial for eventlet/gevent to work correctly.
# It must be done at the very top, before any other modules are imported.
import eventlet
eventlet.monkey_patch()
# Import basic modules only
import os
import sys
# Add current directory to Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from dotenv import load_dotenv
# Load environment variables BEFORE creating the app
load_dotenv()
from app import create_app
from celery_app import celery
app = create_app()
app.app_context().push()