安排AirfFlow DAG作业

编程入门 行业动态 更新时间:2024-10-10 15:24:44
本文介绍了安排AirfFlow DAG作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我写了一个如下的Airflow DAG-

I have written a AirFlow DAG as below -

default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': datetime(2016, 7, 5), 'email': ['airflow@airflow'], 'email_on_failure': False, 'email_on_retry': False, 'retries': 1, 'retry_delay': timedelta(seconds=30), # 'queue': 'bash_queue', # 'pool': 'backfill', # 'priority_weight': 10, # 'end_date': datetime(2016, 1, 1), } dag = DAG( 'test-air', default_args=default_args, schedule_interval='*/2 * * * *') ................. ................. {{Tasks}}

按照上述配置,Job应该每隔一分钟运行一次。而是在下面的输出中显示

As per above config, Job should run every even minute. But instead it shows below output

airflow scheduler -d test-air [2016-07-05 15:24:02,168] {jobs.py:574} INFO - Prioritizing 0 queued jobs [2016-07-05 15:24:02,177] {jobs.py:726} INFO - Starting 0 scheduler jobs [2016-07-05 15:24:02,177] {jobs.py:741} INFO - Done queuing tasks, calling the executor's heartbeat [2016-07-05 15:24:02,177] {jobs.py:744} INFO - Loop took: 0.012636 seconds [2016-07-05 15:24:02,256] {models.py:305} INFO - Finding 'running' jobs without a recent heartbeat [2016-07-05 15:24:02,256] {models.py:311} INFO - Failing jobs without heartbeat after 2016-07-05 15:21:47.256816 [2016-07-05 15:24:07,177] {jobs.py:574} INFO - Prioritizing 0 queued jobs [2016-07-05 15:24:07,182] {jobs.py:726} INFO - Starting 0 scheduler jobs [2016-07-05 15:24:07,182] {jobs.py:741} INFO - Done queuing tasks, calling the executor's heartbeat [2016-07-05 15:24:07,182] {jobs.py:744} INFO - Loop took: 0.007725 seconds [2016-07-05 15:24:07,249] {models.py:305} INFO - Finding 'running' jobs without a recent heartbeat [2016-07-05 15:24:07,249] {models.py:311} INFO - Failing jobs without heartbeat after 2016-07-05 15:21:52.249706

有人可以在这里引导我吗?

Can somebody guide me over here?

感谢 Pari

Thanks Pari

推荐答案

默认情况下,创建的每个dag均处于暂停模式。这在 airflow.cfg文件中定义。 您可以通过以下方式取消暂停:

By default every dag that is created is at "pause" mode. This is defined in your "airflow.cfg" file. You can unpause your dag by

$ airflow unpause test-air

,然后使用调度程序重试。

and retry again with the scheduler.

您还可以从Airflow webUI开启/关闭dag(默认情况下处于关闭状态)

You can also toggle your dag on/off from the Airflow webUI (by default it is off)

更多推荐

安排AirfFlow DAG作业

本文发布于:2023-11-24 11:52:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625096.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:作业   AirfFlow   DAG

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!