data_basedistributed_lockget_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 SERVER and infers the correct lock type. The following locks are supported:

See also

Kazoo documentation <https://kazoo.readthedocs.io/en/latest/index.html>_ and Redis documentation <https://redis-py.readthedocs.io/en/stable/>_