python from taskflow import task from taskflow.patterns import linear_flow class PrintTask(task.Task): def execute(self): print("Hello, TaskFlow!") class AddTask(task.Task): def execute(self, a, b): return a + b flow = linear_flow.Flow("my_flow") flow.add(PrintTask(), AddTask()) engine = linear_flow.Engine(flow) engine.run()


上一篇:
下一篇:
切换中文