mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-01 06:11:02 -06:00
22 lines
379 B
Python
22 lines
379 B
Python
# ❓ Simple
|
|
|
|
from hatchet_sdk import Context, EmptyModel, Hatchet
|
|
|
|
hatchet = Hatchet(debug=True)
|
|
|
|
|
|
@hatchet.task(name="SimpleWorkflow")
|
|
def step1(input: EmptyModel, ctx: Context) -> None:
|
|
print("executed step1")
|
|
|
|
|
|
def main() -> None:
|
|
worker = hatchet.worker("test-worker", slots=1, workflows=[step1])
|
|
worker.start()
|
|
|
|
|
|
# ‼️
|
|
|
|
if __name__ == "__main__":
|
|
main()
|