chore: build errors and linting

This commit is contained in:
g
2024-02-15 17:45:50 -07:00
parent 2b33ce24d2
commit 4d44c7eaff
5 changed files with 25 additions and 24 deletions

View File

@@ -10,8 +10,11 @@ hatchet = Hatchet(debug=True)
class ManualTriggerWorkflow:
@hatchet.step()
def step1(self, context):
res = context.overrides('res', "HELLO")
context.sleep(3)
print("executed step1")
return {"step1": "data1"}
return {"step1": "data1 "+res}
@hatchet.step(parents=["step1"], timeout='4s')
def step2(self, context):
@@ -20,6 +23,21 @@ class ManualTriggerWorkflow:
print("finished step2")
return {"step2": "data2"}
# @hatchet.step()
# def stepb(self, context):
# res = context.overrides('res', "HELLO")
# context.sleep(3)
# print("executed step1")
# return {"step1": "data1 "+res}
# @hatchet.step(parents=["stepb"], timeout='4s')
# def stepc(self, context):
# print("started step2")
# context.sleep(1)
# print("finished step2")
# return {"step2": "data2"}
workflow = ManualTriggerWorkflow()
worker = hatchet.worker('manual-worker', max_threads=4)