mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-31 21:59:49 -06:00
16 lines
318 B
Python
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}")
|