fix: remove debugging flags

This commit is contained in:
Harry
2025-06-23 12:49:18 +08:00
parent b3a8dbe2f5
commit 7f292dc261
5 changed files with 65 additions and 22 deletions

View File

@ -1,4 +1,3 @@
import os
from datetime import timedelta
import pytz
@ -25,17 +24,12 @@ def init_app(app: DifyApp) -> Celery:
},
}
flask_debugging = os.environ.get("FLASK_DEBUG", "0").lower() in {"true", "1", "yes"}
celery_app = Celery(
app.name,
task_cls=FlaskTask,
broker=dify_config.CELERY_BROKER_URL,
backend=dify_config.CELERY_BACKEND,
task_ignore_result=True,
task_always_eager=flask_debugging,
task_eager_propagates=flask_debugging,
)
# Add SSL options to the Celery configuration