You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Detached vs child workflows** — use `call_child_workflow` when the parent needs to `yield` on the result. Use `schedule_new_workflow` (detached) when the parent should spawn and move on:
159
+
160
+
- Fire-and-forget: no awaitable Task, returns the spawned instance ID synchronously.
161
+
- No parent linkage on the spawned instance (no completion or failure flows back).
162
+
- Deterministic default instance ID: derived from the parent instance ID + sequence number so replay resolves to the same history record.
163
+
- Cross-app: pass `app_id=...` — the runtime evaluates `WorkflowAccessPolicy` for the target app.
164
+
- Purge/terminate are not recursive across the boundary — the spawned instance manages its own lifecycle.
165
+
- History propagation is intentionally not offered (detached spawns do not inherit the caller's propagated history).
166
+
167
+
See `examples/workflow/detached.py` for a per-tenant fan-out.
168
+
157
169
Module-level functions:
158
170
-`when_all(tasks)` → `WhenAllTask` — wait for all tasks to complete
159
171
-`when_any(tasks)` → `WhenAnyTask` — wait for first task to complete
0 commit comments