Reduce the doctest lease duration...
authorScott Gasch <[email protected]>
Sat, 20 Aug 2022 01:27:57 +0000 (18:27 -0700)
committerScott Gasch <[email protected]>
Sat, 20 Aug 2022 01:27:57 +0000 (18:27 -0700)
zookeeper.py

index 42771c91287d7c079c0bb0ec2f303ddfa9ce4f91..e2e6ce43417c07c849c949a6ad2fe90c699ffa08 100755 (executable)
@@ -36,7 +36,10 @@ def obtain_lease(
     """Obtain the named lease before invoking a function and skip
     invoking the function if the lease cannot be obtained.
 
-    >>> @obtain_lease(lease_id='zookeeper_doctest')
+    >>> @obtain_lease(
+    ...         lease_id='zookeeper_doctest',
+    ...         initial_duration=datetime.timedelta(seconds=10),
+    ... )
     ... def f(name: str) -> int:
     ...     print(f'Hello, {name}')
     ...     return 123