Skip to content

Commit dc381c5

Browse files
committed
samples: workflow_streams: drop README Notes section
The Notes block (subscriber start position, continue-as-new, closing the stream) was a small docs summary tacked onto the end of the README. The samples themselves cover these points: docstrings in each runner / workflow / activity explain the from_offset behavior, the stream_state field, and the in-band terminator + hold-open pattern. Readers who want the full conceptual treatment go to the docs page; the README sticks to "what the scenarios are and how to run them".
1 parent a760ad3 commit dc381c5

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

workflow_streams/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,3 @@ proc= 5 avail= 5 pend= 0 │ offset= 4 stage=verifying
155155
proc= 6 avail= 6 pend= 0 │ offset= 5 stage=complete
156156
proc= 6 avail= 6 pend= 0 │ workflow result: pipeline ... done
157157
```
158-
159-
## Notes
160-
161-
* **Subscriber start position.** `subscribe(...)` without
162-
`from_offset` starts at the stream's current base offset and
163-
follows live — older events that have been truncated, or that
164-
arrived before the subscribe call, are not replayed. Pass
165-
`from_offset=N` to resume from a known position (see
166-
`run_reconnecting_subscriber.py`); the iterator skips forward to
167-
the current base if `N` has been truncated.
168-
* **Continue-as-new.** Every `*Input` dataclass carries
169-
`stream_state: WorkflowStreamState | None = None`. To survive
170-
continue-as-new without losing buffered items, capture the
171-
workflow's stream state and pass it to the next run via
172-
`WorkflowStream(prior_state=...)` in `@workflow.init`. The
173-
samples declare the field for completeness; none of them
174-
actually trigger continue-as-new.
175-
* **Closing the stream.** Each scenario uses an in-band terminator
176-
plus a short `workflow.sleep` hold-open so subscribers receive
177-
the final event before the workflow exits. See
178-
[Closing the stream](https://docs.temporal.io/develop/python/libraries/workflow-streams#closing-the-stream)
179-
in the docs for the full pattern.

0 commit comments

Comments
 (0)