Add DEMO feature to the project
This commit is contained in:
@@ -144,7 +144,8 @@ class BaseAlertService:
|
||||
else:
|
||||
# Already leader - try to extend the lock
|
||||
current_value = await self.redis.get(lock_key)
|
||||
if current_value and current_value.decode() == instance_id:
|
||||
# Note: decode_responses=True means Redis returns strings, not bytes
|
||||
if current_value and current_value == instance_id:
|
||||
# Still our lock, extend it using a Lua script for atomicity
|
||||
lua_script = """
|
||||
if redis.call("GET", KEYS[1]) == ARGV[1] then
|
||||
|
||||
Reference in New Issue
Block a user