mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-08 01:39:46 -06:00
chore: build errors and linting
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user