[英]Prefect how to wait for external dependency
I have a prefect flow that I want to run if and when a specific file appears.我有一个完美的流程,我想在出现特定文件时运行它。 With something like Luigi you would create an ExternalTask that outputs that file and then impose a dependence on it.
使用 Luigi 之类的东西,您可以创建一个 ExternalTask 来输出该文件,然后对其施加依赖。 What is the standard pattern for this in Prefect?
Prefect 中的标准模式是什么?
There are a few options depending on your use case:根据您的用例,有几个选项:
create_flow_run
whenever your external condition is met (possibly with Parameter
values describing the condition) to create an ad-hoc run of your flow.Parameter
值)时调用create_flow_run
来创建流的临时运行。 For more discussion of this pattern, check out this stackoverflow question
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.