Skip to content

Commit

Permalink
Properly document current StreamOptions defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
erickpintor committed Aug 21, 2024
1 parent dae9d68 commit 743087a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion fauna/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 743087a

Please sign in to comment.