get_ttl#
get_ttl
returns how many seconds remain until the lock expires. An expired lock might not be lockable. It is possible that another worker is waiting for the lock to expire. It might be helpful to call this method in order to determine whether to wait for the lock or move on to another task. This method returns the number of seconds left until the lock expires, or None if there is no lock or it has already expired.
Definition#
1 2 3 |
|
Examples#
1 2 3 4 5 6 7 8 9 |
|