chore(api): rename configuration EVENT_BUS_REDIS_CLUSTERS (#33528)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
QuantumGhost
2026-03-16 17:50:15 +08:00
committed by GitHub
parent 598189d307
commit 4a090876f1
4 changed files with 31 additions and 29 deletions

View File

@@ -737,24 +737,25 @@ SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS=30
SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL=90000 SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL=90000
# Redis URL used for PubSub between API and # Redis URL used for event bus between API and
# celery worker # celery worker
# defaults to url constructed from `REDIS_*` # defaults to url constructed from `REDIS_*`
# configurations # configurations
PUBSUB_REDIS_URL= EVENT_BUS_REDIS_URL=
# Pub/sub channel type for streaming events. # Event transport type. Options are:
# valid options are:
# #
# - pubsub: for normal Pub/Sub # - pubsub: normal Pub/Sub (at-most-once)
# - sharded: for sharded Pub/Sub # - sharded: sharded Pub/Sub (at-most-once)
# - streams: Redis Streams (at-least-once, recommended to avoid subscriber races)
# #
# It's highly recommended to use sharded Pub/Sub AND redis cluster # Note: Before enabling 'streams' in production, estimate your expected event volume and retention needs.
# for large deployments. # Configure Redis memory limits and stream trimming appropriately (e.g., MAXLEN and key expiry) to reduce
PUBSUB_REDIS_CHANNEL_TYPE=pubsub # the risk of data loss from Redis auto-eviction under memory pressure.
# Whether to use Redis cluster mode while running # Also accepts ENV: EVENT_BUS_REDIS_CHANNEL_TYPE.
# PubSub. EVENT_BUS_REDIS_CHANNEL_TYPE=pubsub
# Whether to use Redis cluster mode while use redis as event bus.
# It's highly recommended to enable this for large deployments. # It's highly recommended to enable this for large deployments.
PUBSUB_REDIS_USE_CLUSTERS=false EVENT_BUS_REDIS_USE_CLUSTERS=false
# Whether to Enable human input timeout check task # Whether to Enable human input timeout check task
ENABLE_HUMAN_INPUT_TIMEOUT_TASK=true ENABLE_HUMAN_INPUT_TIMEOUT_TASK=true

View File

@@ -41,10 +41,10 @@ class RedisPubSubConfig(BaseSettings, RedisConfigDefaultsMixin):
) )
PUBSUB_REDIS_USE_CLUSTERS: bool = Field( PUBSUB_REDIS_USE_CLUSTERS: bool = Field(
validation_alias=AliasChoices("EVENT_BUS_REDIS_CLUSTERS", "PUBSUB_REDIS_USE_CLUSTERS"), validation_alias=AliasChoices("EVENT_BUS_REDIS_USE_CLUSTERS", "PUBSUB_REDIS_USE_CLUSTERS"),
description=( description=(
"Enable Redis Cluster mode for pub/sub or streams transport. Recommended for large deployments. " "Enable Redis Cluster mode for pub/sub or streams transport. Recommended for large deployments. "
"Also accepts ENV: EVENT_BUS_REDIS_CLUSTERS." "Also accepts ENV: EVENT_BUS_REDIS_USE_CLUSTERS."
), ),
default=False, default=False,
) )

View File

@@ -1546,24 +1546,25 @@ SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL=200
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS=30 SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS=30
# Redis URL used for PubSub between API and # Redis URL used for event bus between API and
# celery worker # celery worker
# defaults to url constructed from `REDIS_*` # defaults to url constructed from `REDIS_*`
# configurations # configurations
PUBSUB_REDIS_URL= EVENT_BUS_REDIS_URL=
# Pub/sub channel type for streaming events. # Event transport type. Options are:
# valid options are:
# #
# - pubsub: for normal Pub/Sub # - pubsub: normal Pub/Sub (at-most-once)
# - sharded: for sharded Pub/Sub # - sharded: sharded Pub/Sub (at-most-once)
# - streams: Redis Streams (at-least-once, recommended to avoid subscriber races)
# #
# It's highly recommended to use sharded Pub/Sub AND redis cluster # Note: Before enabling 'streams' in production, estimate your expected event volume and retention needs.
# for large deployments. # Configure Redis memory limits and stream trimming appropriately (e.g., MAXLEN and key expiry) to reduce
PUBSUB_REDIS_CHANNEL_TYPE=pubsub # the risk of data loss from Redis auto-eviction under memory pressure.
# Whether to use Redis cluster mode while running # Also accepts ENV: EVENT_BUS_REDIS_CHANNEL_TYPE.
# PubSub. EVENT_BUS_REDIS_CHANNEL_TYPE=pubsub
# Whether to use Redis cluster mode while use redis as event bus.
# It's highly recommended to enable this for large deployments. # It's highly recommended to enable this for large deployments.
PUBSUB_REDIS_USE_CLUSTERS=false EVENT_BUS_REDIS_USE_CLUSTERS=false
# Whether to Enable human input timeout check task # Whether to Enable human input timeout check task
ENABLE_HUMAN_INPUT_TIMEOUT_TASK=true ENABLE_HUMAN_INPUT_TIMEOUT_TASK=true

View File

@@ -699,9 +699,9 @@ x-shared-env: &shared-api-worker-env
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: ${SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE:-1000} SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE: ${SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_SIZE:-1000}
SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: ${SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL:-200} SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL: ${SANDBOX_EXPIRED_RECORDS_CLEAN_BATCH_MAX_INTERVAL:-200}
SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: ${SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS:-30} SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS: ${SANDBOX_EXPIRED_RECORDS_RETENTION_DAYS:-30}
PUBSUB_REDIS_URL: ${PUBSUB_REDIS_URL:-} EVENT_BUS_REDIS_URL: ${EVENT_BUS_REDIS_URL:-}
PUBSUB_REDIS_CHANNEL_TYPE: ${PUBSUB_REDIS_CHANNEL_TYPE:-pubsub} EVENT_BUS_REDIS_CHANNEL_TYPE: ${EVENT_BUS_REDIS_CHANNEL_TYPE:-pubsub}
PUBSUB_REDIS_USE_CLUSTERS: ${PUBSUB_REDIS_USE_CLUSTERS:-false} EVENT_BUS_REDIS_USE_CLUSTERS: ${EVENT_BUS_REDIS_USE_CLUSTERS:-false}
ENABLE_HUMAN_INPUT_TIMEOUT_TASK: ${ENABLE_HUMAN_INPUT_TIMEOUT_TASK:-true} ENABLE_HUMAN_INPUT_TIMEOUT_TASK: ${ENABLE_HUMAN_INPUT_TIMEOUT_TASK:-true}
HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: ${HUMAN_INPUT_TIMEOUT_TASK_INTERVAL:-1} HUMAN_INPUT_TIMEOUT_TASK_INTERVAL: ${HUMAN_INPUT_TIMEOUT_TASK_INTERVAL:-1}
SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: ${SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL:-90000} SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL: ${SANDBOX_EXPIRED_RECORDS_CLEAN_TASK_LOCK_TTL:-90000}