mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-04 15:52:25 -06:00
13 lines
291 B
Python
13 lines
291 B
Python
from hatchet_sdk import Context, EmptyModel, Hatchet
|
|
|
|
hatchet = Hatchet()
|
|
|
|
# ❓ Event trigger
|
|
event_workflow = hatchet.workflow(name="EventWorkflow", on_events=["user:create"])
|
|
# ‼️
|
|
|
|
|
|
@event_workflow.task()
|
|
def task(input: EmptyModel, ctx: Context) -> None:
|
|
print("event received")
|