mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-30 13:19:44 -06:00
* api changes * doc changes * move docs * generated * generate * pkg * backmerge main * revert to main * revert main * race? * remove go tests
32 lines
763 B
Python
32 lines
763 B
Python
import asyncio
|
|
|
|
from examples.bulk_fanout.worker import ParentInput, bulk_parent_wf
|
|
from hatchet_sdk import Hatchet
|
|
from hatchet_sdk.clients.admin import TriggerWorkflowOptions
|
|
|
|
hatchet = Hatchet()
|
|
|
|
|
|
async def main() -> None:
|
|
results = bulk_parent_wf.run_many(
|
|
workflows=[
|
|
bulk_parent_wf.create_bulk_run_item(
|
|
input=ParentInput(n=i),
|
|
options=TriggerWorkflowOptions(
|
|
additional_metadata={
|
|
"bulk-trigger": i,
|
|
"hello-{i}": "earth-{i}",
|
|
}
|
|
),
|
|
)
|
|
for i in range(20)
|
|
],
|
|
)
|
|
|
|
for result in results:
|
|
print(result)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|