This commit is contained in:
beabigegg
2025-08-17 15:26:44 +08:00
commit 0fee703b84
60 changed files with 8042 additions and 0 deletions

14
celery_worker.py Normal file
View File

@@ -0,0 +1,14 @@
# 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()
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()