diff options
| author | Hanno Schlichting <hanno@hannosch.eu> | 2012-08-30 23:37:10 +0200 |
|---|---|---|
| committer | Hanno Schlichting <hanno@hannosch.eu> | 2012-08-30 23:44:59 +0200 |
| commit | 82f8be3bbe199dacd922a27841718a6d7766d6ec (patch) | |
| tree | bf61e398e106c64481e72dc09afa706f9a8925cb | |
| parent | 3f284c36f6d3aac0d7ff82ec92aacc3751f123ef (diff) | |
| download | kazoo-82f8be3bbe199dacd922a27841718a6d7766d6ec.tar.gz | |
officially document client.retry and the availibility of the recipes
| -rw-r--r-- | docs/api/client.rst | 5 | ||||
| -rw-r--r-- | docs/basic_usage.rst | 2 | ||||
| -rw-r--r-- | kazoo/client.py | 6 |
3 files changed, 13 insertions, 0 deletions
diff --git a/docs/api/client.rst b/docs/api/client.rst index 04ec2e9..e262d2b 100644 --- a/docs/api/client.rst +++ b/docs/api/client.rst @@ -13,3 +13,8 @@ Public API :member-order: bysource .. automethod:: __init__ + + .. attribute:: retry + + An instance of :class:`~kazoo.retry.KazooRetry` acting as a wrapper + to retry other methods, See :ref:`retrying_commands`. diff --git a/docs/basic_usage.rst b/docs/basic_usage.rst index 097723f..26c16c7 100644 --- a/docs/basic_usage.rst +++ b/docs/basic_usage.rst @@ -151,6 +151,8 @@ will be raised instead of deleting. zk.delete("/my/favorite/node", recursive=True) +.. _retrying_commands: + Retrying Commands ================= diff --git a/kazoo/client.py b/kazoo/client.py index 8f4244e..effbc78 100644 --- a/kazoo/client.py +++ b/kazoo/client.py @@ -87,6 +87,12 @@ class KazooClient(object): Retry parameters will be used for connection establishment attempts and reconnects. + As a convenience all recipe classes are available as attributes and + get automatically bound to the client. For example:: + + zk = KazooClient() + lock = zk.Lock('/lock_path') + """ # Record the handler strategy used self.handler = handler if handler else SequentialThreadingHandler() |
