diff options
| author | Scott Gasch <[email protected]> | 2022-08-19 18:27:57 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-08-19 18:27:57 -0700 |
| commit | e46158e49121b8a955bb07b73f5bcf9928b79c90 (patch) | |
| tree | 6bbeec8ac1a7c23879dfae124f7664df516c9920 | |
| parent | 4f457d760b6163eec639cf9e7bab4d5b9c1c29f0 (diff) | |
Reduce the doctest lease duration...
| -rwxr-xr-x | zookeeper.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zookeeper.py b/zookeeper.py index 42771c9..e2e6ce4 100755 --- 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 |
