[英]How to assign a name to a control_flow in prefect?
How do you assign a name
to a merge
task in a flow?如何为流中的
merge
任务分配name
?
thing_three = merge(thing_one, thing_two)
The ultimate goal is to retrieve merge
using flow.get_tasks(name="thing_merger")
最终目标是使用
flow.get_tasks(name="thing_merger")
检索merge
Thanks in advance.提前致谢。
The most straightforward way to handle this would be to use:处理此问题的最直接方法是使用:
thing_three = merge(thing_one, thing_two)
thing_three.name = "thing_merger"
Then when you call flow.get_tasks(name="thing_merger")
, it'll return:然后当你调用
flow.get_tasks(name="thing_merger")
时,它会返回:
[<Task: thing_merger>]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.