如果以前的触发器仍在运动,如何使气流DAG跳过一个小时

发布于 2025-02-06 15:02:02 字数 583 浏览 0 评论 0原文

一个简单的气流DAG开发问题

args = {
    'owner': 'Airflow',
    'start_date': dates.days_ago(1),
    'email': ['[email protected]', '[email protected]'],
    'email_on_failure': True,
    'email_on_success': True,
    'schedule_interval': '0 * * * *',
}

上述配置指出,DAG应每小时在小时的顶部运行。

如果以前的工作仍在运动,该如何使工作跳过一小时?

谢谢!

A simple question for airflow DAG development

args = {
    'owner': 'Airflow',
    'start_date': dates.days_ago(1),
    'email': ['[email protected]', '[email protected]'],
    'email_on_failure': True,
    'email_on_success': True,
    'schedule_interval': '0 * * * *',
}

The above configuration states that the DAG should run every hour on the top of the hour.

How do I make the job skip one hour if the previous job is still in motion?

Thanks!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乙白 2025-02-13 15:02:02

如评论中所述,您可以通过设置max_active_runs = 1来实现所需的目标。但是,这将取决于预期行为的更广泛背景。

如果您需要更复杂的时间表,请考虑实施自己的 nofollow noreferrer /a>。

As mentioned in comment you can achieve what you want by setting max_active_runs=1. However, this will depend on wider context of expected behaviour.

If you need more complex schedule consider implementing your own Timetable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文