Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Add Env 'CELERY_SENTINEL_PASSWORD' for celery connect redis sentinel. (#21198)
湛露先生28f5c37211bb
diff --git a/api/configs/middleware/__init__.py b/api/configs/middleware/__init__.pyindex 60ba272ec92..427602676fe 100644--- a/api/configs/middleware/__init__.py+++ b/api/configs/middleware/__init__.py@@ -223,6 +223,10 @@ class CeleryConfig(DatabaseConfig):default=None,)+ CELERY_SENTINEL_PASSWORD: Optional[str] = Field(+ description="Password of the Redis Sentinel master.",+ default=None,+ )CELERY_SENTINEL_SOCKET_TIMEOUT: Optional[PositiveFloat] = Field(description="Timeout for Redis Sentinel socket operations in seconds.",default=0.1,diff --git a/api/extensions/ext_celery.py b/api/extensions/ext_celery.pyindex a8375520079..6279b1ad363 100644--- a/api/extensions/ext_celery.py+++ b/api/extensions/ext_celery.py@@ -21,6 +21,7 @@ def init_app(app: DifyApp) -> Celery:"master_name": dify_config.CELERY_SENTINEL_MASTER_NAME,"sentinel_kwargs": {"socket_timeout": dify_config.CELERY_SENTINEL_SOCKET_TIMEOUT,+ "password": dify_config.CELERY_SENTINEL_PASSWORD,},}diff --git a/docker/.env.example b/docker/.env.exampleindex 275da8e2e4e..a024566c8f8 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -285,6 +285,7 @@ BROKER_USE_SSL=false# If you are using Redis Sentinel for high availability, configure the following settings.CELERY_USE_SENTINEL=falseCELERY_SENTINEL_MASTER_NAME=+CELERY_SENTINEL_PASSWORD=CELERY_SENTINEL_SOCKET_TIMEOUT=0.1# ------------------------------diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yamlindex 0019835357b..0d187176b07 100644--- a/docker/docker-compose.yaml+++ b/docker/docker-compose.yaml@@ -79,6 +79,7 @@ x-shared-env: &shared-api-worker-envBROKER_USE_SSL: ${BROKER_USE_SSL:-false}CELERY_USE_SENTINEL: ${CELERY_USE_SENTINEL:-false}CELERY_SENTINEL_MASTER_NAME: ${CELERY_SENTINEL_MASTER_NAME:-}+ CELERY_SENTINEL_PASSWORD: ${CELERY_SENTINEL_PASSWORD:-}CELERY_SENTINEL_SOCKET_TIMEOUT: ${CELERY_SENTINEL_SOCKET_TIMEOUT:-0.1}WEB_API_CORS_ALLOW_ORIGINS: ${WEB_API_CORS_ALLOW_ORIGINS:-*}CONSOLE_CORS_ALLOW_ORIGINS: ${CONSOLE_CORS_ALLOW_ORIGINS:-*}