Commit d5cc2fe
committed
samples: workflow_streams: drop force_flush=True from charge_card
The activity's final publish was using force_flush=True, which sets the
flush_event so the background flusher fires immediately. Triggering a
flush right before __aexit__ runs the activity into the
WorkflowStreamClient's cancel-mid-flush path: __aexit__ cancels the
flusher task while it's awaiting the publish signal RPC, the cancel
propagates into the in-flight signal, and the activity hangs until the
StartToClose timeout fires. Empirically the workflow then retries the
activity indefinitely.
Without force_flush=True the buffered "card charged" event flushes via
the regular 200ms batch interval and the flusher is sleeping in
wait_for(...) when __aexit__ cancels it — a clean cancellation path.
The user-visible publish ordering is unchanged.
The underlying SDK bug should be fixed separately by switching __aexit__
from cancel() to a cooperative-stop flag so the in-flight signal
completes before the flusher exits.1 parent 0962379 commit d5cc2fe
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
0 commit comments