Skip to content

Commit

Permalink
Revert "Fix TTL units in docstring of lock"
Browse files Browse the repository at this point in the history
This reverts commit ae842ef.
  • Loading branch information
coleifer committed Dec 24, 2019
1 parent 2276086 commit 9aea769
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions walrus/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Lock(object):
exceeds its TTL, and threads that are blocked waiting for the
lock could potentially re-acquire it.
.. note:: TTL is specified in **seconds**.
.. note:: TTL is specified in **milliseconds**.
Locks can be used as context managers or as decorators:
Expand All @@ -42,7 +42,7 @@ def __init__(self, database, name, ttl=None, lock_id=None):
"""
:param database: A walrus ``Database`` instance.
:param str name: The name for the lock.
:param int ttl: The time-to-live for the lock in seconds.
:param int ttl: The time-to-live for the lock in milliseconds.
:param str lock_id: Unique identifier for the lock instance.
"""
self.database = database
Expand All @@ -63,7 +63,7 @@ def acquire(self, block=True):
Acquire the lock. The lock will be held until it is released
by calling :py:meth:`Lock.release`. If the lock was
initialized with a ``ttl``, then the lock will be released
automatically after the given number of seconds.
automatically after the given number of milliseconds.
By default this method will block until the lock becomes
free (either by being released or expiring). The blocking is
Expand Down

0 comments on commit 9aea769

Please sign in to comment.