-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
Description
In the current version of your code, the prefix "redlock:" is systematically added to any Redlock lock key created with:
object_lock = Redlock(key=lock_key, masters={redis_1, redis_2, redis_3}, auto_release_time=20)
This imposes a constraint on other programs using the lock key to coordinate access to a resource, namely to use the same prefix in front of the key. This is very inconvenient since existing code needs to be changed to adapt to this requirement.
Moreover, the use of the prefix is not documented (I discovered it by looking at the content of the Redis servers).
Is there a way to use the Redlock without imposing a specific prefix? Ideally, if a prefix is added, it should be a parameter when creating the Redlock object.
Reactions are currently unavailable