是否有“dag_dir_list_interval”的替代方案?在 Airflow 中将 dags 从存储上传到调度程序?

发布于 2025-01-12 10:01:23 字数 374 浏览 4 评论 0原文

希望你们一切都好。

我正在使用 Helm Chart 在 Kubernetes 上部署的气流实例。 我在 rook nfs 存储中设置了 dag 文件夹。 我需要气流调度程序立即处理这些数据。 Airflow提供了一个环境变量,即“dag_dir_list_interval”。在我的配置中,我将此变量设置为 1,这意味着调度程序将每秒检查 dag 文件夹中是否有新的 dag 文件。

它可以工作,但正如你可以想象的那样,它的效率非常低,因为它在 CPU 使用方面花费了很多钱。

我想知道这个环境变量是否有任何替代方案,例如,假设有一个调用 API,它允许我告诉调度程序“嘿,有一个新的 dag 需要处理”,而无需每秒检查该环境变量中是否有新文件。 nfs存储。

感谢您的建议。

hope you are all doing well.

I am using an airflow instance deployed on Kubernetes using Helm Chart.
I setup my dag folder inside a rook nfs storage.
I need these dags to be processed instantly by the airflow scheduler.
Airflow provide an environment variable, namely "dag_dir_list_interval". In my configuration I set this variable to 1 which means that the scheduler will check every seconds if there is a new dag file inside the dag folder.

It works but as you can imagine it is very not efficiency as it costs a lot in terms of CPU Usage.

I wanted to know if there were any alternative to this environment variable, for example, let's say a call API that allows me to tell to the scheduler "hey there is a new dag to be processed" without checking every seconds for new file inside the nfs storage.

Thank you for your suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文