mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
feat: plugin OAuth with stateful
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import os
|
||||
from datetime import timedelta
|
||||
|
||||
import pytz
|
||||
@ -24,12 +25,17 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user