refactor(config): SIGNAL_CACHE_CONFIG → DISTRIBUTED_COORDINATION_CONFIG (#38395)

This commit is contained in:
Michael S. Molina
2026-03-04 14:40:21 -03:00
committed by GitHub
parent 832fee3ff8
commit 19f949276c
15 changed files with 95 additions and 85 deletions

View File

@@ -46,7 +46,7 @@ class AcquireDistributedLock(BaseDistributedLockCommand):
"""
Acquire a distributed lock with automatic backend selection.
Uses Redis SET NX EX when SIGNAL_CACHE_CONFIG is configured,
Uses Redis SET NX EX when DISTRIBUTED_COORDINATION_CONFIG is configured,
otherwise falls back to KeyValue table.
Raises AcquireDistributedLockFailedException if:

View File

@@ -41,12 +41,12 @@ def get_default_lock_ttl() -> int:
def get_redis_client() -> "redis.Redis[Any] | None":
"""
Get Redis client from signal cache if available.
Get Redis client from distributed coordination if available.
Returns None if SIGNAL_CACHE_CONFIG is not configured,
Returns None if DISTRIBUTED_COORDINATION_CONFIG is not configured,
allowing fallback to database-backed locking.
"""
backend = cache_manager.signal_cache
backend = cache_manager.distributed_coordination
return backend._cache if backend else None

View File

@@ -40,7 +40,7 @@ class ReleaseDistributedLock(BaseDistributedLockCommand):
"""
Release a distributed lock with automatic backend selection.
Uses Redis DELETE when SIGNAL_CACHE_CONFIG is configured,
Uses Redis DELETE when DISTRIBUTED_COORDINATION_CONFIG is configured,
otherwise deletes from KeyValue table.
"""