Files
hatchet/sdks/python/examples/concurrency_limit_rr_load/event.py
T
Matt Kaye 5062bf1e3e V1 SDKs and Docs (#1361)
New SDKs and docs for the v1 release.
2025-03-25 15:45:07 -07:00

14 lines
301 B
Python

import random
from hatchet_sdk import Hatchet
hatchet = Hatchet(debug=True)
# Create a list of events with desired distribution
events = ["1"] * 10000 + ["0"] * 100
random.shuffle(events)
# Send the shuffled events
for group in events:
hatchet.event.push("concurrency-test", {"group": group})