unlock

lockmgr.lockmgr.unlock(lock: Union[lockmgr.models.Lock, str])[source]

Releases a given lock - either specified as a string name, or as a payments.models.Lock object.

Usage:

>>> mylock = get_lock('mylock', expires=60)
>>> unlock('mylock') # Delete the lock by name
>>> unlock(mylock)   # Or by Lock object.
Parameters
  • lock (Lock) – The name of the lock to release

  • lock – A Lock object to release