pip install taskflow python from taskflow import task python class MyTask(task.Task): def execute(self): print("Task executed!") python from taskflow import engines from taskflow.patterns import linear_flow python flow = linear_flow.Flow('my_flow') python flow.add(MyTask(), provides='task1_output') flow.add(MyTask(), provides='task2_output', requires='task1_output') python engine = engines.load(flow) engine.run()


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