From 743087ac447a81ff0ea41a501fc4e19662b98d5c Mon Sep 17 00:00:00 2001 From: Erick Pintor Date: Wed, 21 Aug 2024 12:00:30 -0300 Subject: [PATCH] Properly document current `StreamOptions` defaults --- README.md | 9 +++++---- fauna/client/client.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8924ed57..2bfe4889 100644 --- a/README.md +++ b/README.md @@ -398,10 +398,11 @@ You can pass a ``StreamOptions`` object to override these defaults: ```python options = StreamOptions( - max_attempts=5, - max_backoff=1, - start_ts=1710968002310000, - status_events=True, + max_attempts=3, + max_backoff=20, + start_ts=None, + cursor=None, + status_events=False, ) client.stream(fql('Product.all().toStream()'), options) diff --git a/fauna/client/client.py b/fauna/client/client.py index 8e181593..97556455 100644 --- a/fauna/client/client.py +++ b/fauna/client/client.py @@ -421,7 +421,7 @@ def stream( if isinstance(fql, Query): if opts.cursor is not None: raise ClientError( - "The 'cursor' configuration can only be used with a stream token.") + "The 'cursor' configuration can only be used with a stream token.") token = self.query(fql).data else: