我写了一个AirFlow DAG,如下所示 -
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2016, 7, 5),
'email': ['airflow@airflow.com'],
'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应该每隔一分钟运行一次。但它显示在输出
之下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
有人可以指导我吗?
由于 彩
答案 0 :(得分:9)
默认情况下,每个创建的dag都在"暂停"模式。这是在你的" airflow.cfg"中定义的。文件。 你可以通过
取消你的dag$ airflow unpause test-air
并使用调度程序再次重试。
你也可以从Airflow webUI上打开/关闭你的dag(默认情况下是关闭的)