data_base ❭ distributed_lock ❭ get_lock
get_lock¶
- data_base.distributed_lock.get_lock(name)¶
Fetch the correct lock, depending on global locking server configuration.
Reads the locking configuration from the global variable
SERVERand infers the correct lock type. The following locks are supported:InterProcessLockNoWritePermission: for file based locking.redis.lock.Lock: for redis based locking.kazoo.client.Lock: for Apache zookeeper based locking.
See also
Kazoo documentation <https://kazoo.readthedocs.io/en/latest/index.html>_ and Redis documentation <https://redis-py.readthedocs.io/en/stable/>_