Files
hatchet/examples/python/fanout/example_child_spawn.py
matt 4a50e454a6 Fix: Python docs examples (#2255)
* feat: client example

* fix: batch i

* fix: batch ii

* fix: batch iii

* fix: batch iv
2025-09-05 15:08:23 -04:00

16 lines
318 B
Python

# > Child spawn
from examples.fanout.worker import ChildInput, child_wf
# 👀 example: run this inside of a parent task to spawn a child
child_wf.run(
ChildInput(a="b"),
)
# > Error handling
try:
child_wf.run(
ChildInput(a="b"),
)
except Exception as e:
print(f"Child workflow failed: {e}")