hatchet-dev / hatchet

A distributed, fault-tolerant task queue
https://hatchet.run
MIT License
3.82k stars 126 forks source link

feat(sdk): expose `registerAction` on python and typescript SDKs #272

Open abelanger5 opened 4 months ago

abelanger5 commented 4 months ago

Allow users to set registerAction so they can run steps on different workers. This also involves letting users call a step which isn't registered on that workflow/worker, so this involves a little bit of work on the workflow models for each SDK.

grutt commented 3 months ago

For registering the step in the workflow are we thinking we'll just add a prop and enforce either run or action?

{
    run: Function,
    action: string
}

for Python, I guess we'll need to decorate an empty function?


@hatchet.step(action="action:name", parents=["parent"])
def actionStep(self, context : Context):
   pass

Not sure about Go