From e46158e49121b8a955bb07b73f5bcf9928b79c90 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Fri, 19 Aug 2022 18:27:57 -0700 Subject: [PATCH] Reduce the doctest lease duration... --- zookeeper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.46.0