Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit 44ff1ed

Browse files
committed
Updating docstring.
1 parent 81c7dd8 commit 44ff1ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

watch/watch.py

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ def unmarshal_event(self, data, return_type):
107107
def stream(self, func, *args, **kwargs):
108108
"""Watch an API resource and stream the result back via a generator.
109109
110+
Note that watching an API resource can expire. The method tries to
111+
resume automatically from the last result, but if that last result
112+
is too old as well, an `ApiException` exception will be thrown with
113+
``code`` 410. In that case you have to recover yourself, probably
114+
by listing the API resource to obtain the latest state and then
115+
watching from that state on by setting ``resource_version`` to
116+
one returned from listing.
117+
110118
:param func: The API function pointer. Any parameter to the function
111119
can be passed after this parameter.
112120

0 commit comments

Comments
 (0)