projects
/
python_utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f457d7
)
Reduce the doctest lease duration...
author
Scott Gasch
<
[email protected]
>
Sat, 20 Aug 2022 01:27:57 +0000
(18:27 -0700)
committer
Scott Gasch
<
[email protected]
>
Sat, 20 Aug 2022 01:27:57 +0000
(18:27 -0700)
zookeeper.py
patch
|
blob
|
history
diff --git
a/zookeeper.py
b/zookeeper.py
index 42771c91287d7c079c0bb0ec2f303ddfa9ce4f91..e2e6ce43417c07c849c949a6ad2fe90c699ffa08 100755
(executable)
--- a/
zookeeper.py
+++ b/
zookeeper.py
@@
-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