mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-31 05:39:41 -06:00
* api changes * doc changes * move docs * generated * generate * pkg * backmerge main * revert to main * revert main * race? * remove go tests
21 lines
368 B
Python
21 lines
368 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()
|