这似乎应该很简单,但我不知道如何在单个流中同时包含状态和数据依赖项。这是我尝试的(简化):
with Flow("load_data") as flow:
test_results = prepare_file1()
load_file1(test_results)
participants = prepare_file2()
load_file2(participants)
email = flow.add_task(EmailTask(name='email', subject='Flow succeeded!', msg='flow succeeded', email_to='xxx', email_from='xxx', smtp_server='xxx',smtp_port=25, smtp_type='INSECURE',))
flow.set_dependencies(task=email, upstream_tasks=[load_file1,load_file2])
flow.visualize()
这意味着 load_file1 和 load_file2 运行两次。我可以只设置一个额外的依赖项,以便在两个加载任务完成时运行电子邮件吗?
谢谢