From 5b72987e80a7765ce6e464232a7f1519243d0a73 Mon Sep 17 00:00:00 2001 From: Jeremy Mayeres <1524722+jerr0328@users.noreply.github.com> Date: Sun, 14 Nov 2021 11:52:57 +0100 Subject: Improve documentation about Lock (#1701) --- redis/lock.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redis/lock.py b/redis/lock.py index 326dbaf..d229752 100644 --- a/redis/lock.py +++ b/redis/lock.py @@ -76,14 +76,14 @@ class Lock: Create a new Lock instance named ``name`` using the Redis client supplied by ``redis``. - ``timeout`` indicates a maximum life for the lock. + ``timeout`` indicates a maximum life for the lock in seconds. By default, it will remain locked until release() is called. ``timeout`` can be specified as a float or integer, both representing the number of seconds to wait. - ``sleep`` indicates the amount of time to sleep per loop iteration - when the lock is in blocking mode and another client is currently - holding the lock. + ``sleep`` indicates the amount of time to sleep in seconds per loop + iteration when the lock is in blocking mode and another client is + currently holding the lock. ``blocking`` indicates whether calling ``acquire`` should block until the lock has been acquired or to fail immediately, causing ``acquire`` -- cgit v1.2.1