Python 2.7 为什么任务在触发后在气流1.10.2中停留在无状态

Python 2.7 为什么任务在触发后在气流1.10.2中停留在无状态,python-2.7,airflow,Python 2.7,Airflow,我有一个虚拟DAG,我想通过将其开始日期设置为今天并将其计划间隔设置为每日 以下是DAG代码: #/usr/bin/env python #-*-编码:utf-8-*- #-*-气流:DAG-*- 导入日志记录 从气流导入DAG 从airflow.operators.dummy_operator导入dummy operator 从afflow.operators.python_operator导入PythonOperator 从日期时间导入日期时间 logger=logging.getLogge

我有一个虚拟DAG,我想通过将其
开始日期设置为
今天
并将其计划间隔设置为
每日

以下是DAG代码:

#/usr/bin/env python
#-*-编码:utf-8-*-
#-*-气流:DAG-*-
导入日志记录
从气流导入DAG
从airflow.operators.dummy_operator导入dummy operator
从afflow.operators.python_operator导入PythonOperator
从日期时间导入日期时间
logger=logging.getLogger(“DummyDAG”)
def execute_python_函数():
logging.info(“嘿哟!!!”)
返回真值
dag=dag(dag_id='dummy_dag',
开始日期=datetime.today())
start=DummyOperator(任务id='start',dag=dag)
end=dummy运算符(task_id='end',dag=dag)
py_操作符=PythonOperator(任务id='exec_函数',
python\u callable=执行python\u函数,
dag=dag)
开始>>py_运算符>>结束
在Airflow 1.9.0中,当我执行
Airflow触发器_dag-e 20190701
时,将创建dag运行,并创建、调度和执行任务实例

但是,在Airflow 1.10.2中,DAG运行也创建了任务实例,但它们仍处于
None
状态

对于这两个版本,依赖于过去的值都是
False

以下是Airflow 1.9.0中的
启动
任务的详细信息(在一段时间后成功执行)

任务实例详细信息
阻止调度任务的依赖项
依赖性:原因
Dagrun正在运行:任务实例的Dagrun未处于“正在运行”状态,但处于“成功”状态。
任务实例状态:任务处于“成功”状态,该状态不是执行的有效状态。必须清除该任务才能运行。
执行日期:执行日期为2019-07-10T00:00:00,但在任务开始日期2019-07-11T08:45:18.230876之前。
执行日期:执行日期为2019-07-10T00:00:00,但在任务的DAG开始日期2019-07-11T08:45:18.230876之前。
任务实例属性
属性值
dag_id虚拟_dag
持续时间无
结束日期2019-07-10 16:32:10.372976
执行日期2019-07-10 00:00:00
生成命令
主机名-worker-5dc5b999b6-2l5cp
你是错的吗
没有工作
键('dummy_dag','start',datetime.datetime(2019,7,10,0,0))
日志
log_filepath/home/aiffair/gcs/logs/dummy_dag/start/2019-07-10T00:00:00.log
日志urlhttps://i39907f7014685e91-tp.appspot.com/admin/airflow/log?dag_id=dummy_dag&task_id=start&execution_date=2019-07-10T00:00:00
记录器
标记\u成功\u urlhttps://i39907f7014685e91-tp.appspot.com/admin/airflow/success?task_id=start&dag_id=dummy_dag&execution_date=2019-07-10T00:00:00&上游=错误&下游=错误
max_尝试0
元数据(绑定=无)
下一个试试第二个
操作员无
pid 180712
一无所获
以前的没有
优先权重量3
队列默认值
排队的\u dttm无
以用户身份运行\u无
开始日期2019-07-10 16:32:08.483531
国家成功
任务
任务id启动
测试模式错误
试试2号
unixname气流
任务属性
属性值
临时假
达格
dag_id虚拟_dag
取决于过去的错误
deps集合([,]))
下游_列表[]
下游_任务_id['exec_函数']
无电子邮件
电子邮件\u on \u故障为真
电子邮件\u on\u重试为真
结束日期无
执行超时无
日志
记录器
最大重试延迟无
在\u失败\u回调时无
在_重试_回调无
关于成功,没有
所有者气流
参数{}
一无所获
优先权权重1
优先级\重量\总计3
队列默认值
资源{'disk':{'u qty':512','u units'u str':'MB','u name':'disk','gpu':{'u qty':0','u units'u str':'gpu','gpu','ram':{'u qty':512','u units'u str':'MB','u name':'ram','CPU':{'u qty':1','u units'str core(s)','CPU','
重试0次
重试\u延迟0:05:00
重试\u指数\u回退错误
以用户身份运行\u无
计划间隔1天,0:00:00
sla无
开工日期2019-07-11 08:45:18.230876
任务\u并发无
任务id启动
任务型Dummy运算符
模板_ext[]
模板_字段()
触发规则所有成功
ui#U颜色#e8f7e4
ui_fgcolor#000
上游_列表[]
上游任务ID[]
等待\u下游\u错误
气流1.10.2中启动任务的详细信息

Task Instance Details
Dependencies Blocking Task From Getting Scheduled

Dependency  Reason
Execution Date  The execution date is 2019-07-11T00:00:00+00:00 but this is before the task's start date 2019-07-11T08:53:32.593360+00:00.
Execution Date  The execution date is 2019-07-11T00:00:00+00:00 but this is before the task's DAG's start date 2019-07-11T08:53:32.593360+00:00.


Task Instance Attributes

Attribute   Value
dag_id  dummy_dag
duration    None
end_date    None
execution_date  2019-07-11T00:00:00+00:00
executor_config     {}
generate_command    <function generate_command at 0x7f4621301578>
hostname    
is_premature    False
job_id  None
key     ('dummy_dag', 'start', <Pendulum [2019-07-11T00:00:00+00:00]>, 1)
log     <logging.Logger object at 0x7f4624883350>
log_filepath    /home/airflow/gcs/logs/dummy_dag/start/2019-07-11T00:00:00+00:00.log
log_url     https://a15d189066a5c65ee-tp.appspot.com/admin/airflow/log?dag_id=dummy_dag&task_id=start&execution_date=2019-07-11T00%3A00%3A00%2B00%3A00
logger  <logging.Logger object at 0x7f4624883350>
mark_success_url    https://a15d189066a5c65ee-tp.appspot.com/admin/airflow/success?task_id=start&dag_id=dummy_dag&execution_date=2019-07-11T00%3A00%3A00%2B00%3A00&upstream=false&downstream=false
max_tries   0
metadata    MetaData(bind=None)
next_try_number     1
operator    None
pid     None
pool    None
previous_ti     None
priority_weight     3
queue   default
queued_dttm     None
raw     False
run_as_user     None
start_date  None
state   None
task    <Task(DummyOperator): start>
task_id     start
test_mode   False
try_number  1
unixname    airflow


Task Attributes


Attribute   Value
adhoc   False
dag     <DAG: dummy_dag>
dag_id  dummy_dag
depends_on_past     False
deps    set([<TIDep(Previous Dagrun State)>, <TIDep(Trigger Rule)>, <TIDep(Not In Retry Period)>])
downstream_list     [<Task(PythonOperator): exec_function>]
downstream_task_ids     set(['exec_function'])
email   None
email_on_failure    True
email_on_retry  True
end_date    None
execution_timeout   None
executor_config     {}
inlets  []
lineage_data    None
log     <logging.Logger object at 0x7f460b467e10>
logger  <logging.Logger object at 0x7f460b467e10>
max_retry_delay     None
on_failure_callback     None
on_retry_callback   None
on_success_callback     None
outlets     []
owner   Airflow
params  {}
pool    None
priority_weight     1
priority_weight_total   3
queue   default
resources   {'disk': {'_qty': 512, '_units_str': 'MB', '_name': 'Disk'}, 'gpus': {'_qty': 0, '_units_str': 'gpu(s)', '_name': 'GPU'}, 'ram': {'_qty': 512, '_units_str': 'MB', '_name': 'RAM'}, 'cpus': {'_qty': 1, '_units_str': 'core(s)', '_name': 'CPU'}}
retries     0
retry_delay     0:05:00
retry_exponential_backoff   False
run_as_user     None
schedule_interval   1 day, 0:00:00
sla     None
start_date  2019-07-11T08:53:32.593360+00:00
task_concurrency    None
task_id     start
task_type   DummyOperator
template_ext    []
template_fields     ()
trigger_rule    all_success
ui_color    #e8f7e4
ui_fgcolor  #000
upstream_list   []
upstream_task_ids   set([])
wait_for_downstream     False
weight_rule     downstream

任务实例详细信息
阻止调度任务的依赖项
依赖原因
执行日期执行日期为2019-07-11T00:00:00+00:00,但这在任务开始日期2019-07-11T08:53:32.593360+00:00之前。
执行日期执行日期为2019-07-11T00:00:00+00:00,但这在任务DAG的开始日期2019-07-11T08:53:32.593360+00:00之前。
任务实例属性
属性值
dag_id虚拟_dag
持续时间无
结束日期无
执行日期2019-07-11T00:00:00+00:00
执行器配置{}
生成命令
主机名
你是错的吗
没有工作
键('dummy_dag','start',1)
日志
log_文件路径/home/afflow/gcs/logs/dummy_dag/start/2019-07-11T00:00:00+00:00.log
日志urlhttps://a15d189066a5c65ee-tp.appspot.com/admin/airflow/log?dag_id=dummy_dag&task_id=start&execution_date=2019-07-11T00%3A00%3A00%2B00%3A00
记录器
标记\u成功\u urlhttps://a15d189066a5c65ee-tp.appspot.com/admin/airflow/success?task_id=start&dag_id=dummy_dag&execution_date=2019-07-11T00%3A00%3A00%2B00%3A00&上游=假&下游=假
max_尝试0
元数据(绑定=无)
下一步请尝试第1步
操作员无
pid无
一无所获
以前的没有
优先权重量3
队列默认值
排队的\u dttm无
原假
以用户身份运行\u无
开始日期无
无
任务
任务id启动
测试模式错误
试试1号
unixname气流
任务属性
属性值
临时假
达格
dag_id虚拟_dag
取决于过去的错误
deps集合([,,
Task Instance Details
Dependencies Blocking Task From Getting Scheduled

Dependency  Reason
Execution Date  The execution date is 2019-07-11T00:00:00+00:00 but this is before the task's start date 2019-07-11T08:53:32.593360+00:00.
Execution Date  The execution date is 2019-07-11T00:00:00+00:00 but this is before the task's DAG's start date 2019-07-11T08:53:32.593360+00:00.


Task Instance Attributes

Attribute   Value
dag_id  dummy_dag
duration    None
end_date    None
execution_date  2019-07-11T00:00:00+00:00
executor_config     {}
generate_command    <function generate_command at 0x7f4621301578>
hostname    
is_premature    False
job_id  None
key     ('dummy_dag', 'start', <Pendulum [2019-07-11T00:00:00+00:00]>, 1)
log     <logging.Logger object at 0x7f4624883350>
log_filepath    /home/airflow/gcs/logs/dummy_dag/start/2019-07-11T00:00:00+00:00.log
log_url     https://a15d189066a5c65ee-tp.appspot.com/admin/airflow/log?dag_id=dummy_dag&task_id=start&execution_date=2019-07-11T00%3A00%3A00%2B00%3A00
logger  <logging.Logger object at 0x7f4624883350>
mark_success_url    https://a15d189066a5c65ee-tp.appspot.com/admin/airflow/success?task_id=start&dag_id=dummy_dag&execution_date=2019-07-11T00%3A00%3A00%2B00%3A00&upstream=false&downstream=false
max_tries   0
metadata    MetaData(bind=None)
next_try_number     1
operator    None
pid     None
pool    None
previous_ti     None
priority_weight     3
queue   default
queued_dttm     None
raw     False
run_as_user     None
start_date  None
state   None
task    <Task(DummyOperator): start>
task_id     start
test_mode   False
try_number  1
unixname    airflow


Task Attributes


Attribute   Value
adhoc   False
dag     <DAG: dummy_dag>
dag_id  dummy_dag
depends_on_past     False
deps    set([<TIDep(Previous Dagrun State)>, <TIDep(Trigger Rule)>, <TIDep(Not In Retry Period)>])
downstream_list     [<Task(PythonOperator): exec_function>]
downstream_task_ids     set(['exec_function'])
email   None
email_on_failure    True
email_on_retry  True
end_date    None
execution_timeout   None
executor_config     {}
inlets  []
lineage_data    None
log     <logging.Logger object at 0x7f460b467e10>
logger  <logging.Logger object at 0x7f460b467e10>
max_retry_delay     None
on_failure_callback     None
on_retry_callback   None
on_success_callback     None
outlets     []
owner   Airflow
params  {}
pool    None
priority_weight     1
priority_weight_total   3
queue   default
resources   {'disk': {'_qty': 512, '_units_str': 'MB', '_name': 'Disk'}, 'gpus': {'_qty': 0, '_units_str': 'gpu(s)', '_name': 'GPU'}, 'ram': {'_qty': 512, '_units_str': 'MB', '_name': 'RAM'}, 'cpus': {'_qty': 1, '_units_str': 'core(s)', '_name': 'CPU'}}
retries     0
retry_delay     0:05:00
retry_exponential_backoff   False
run_as_user     None
schedule_interval   1 day, 0:00:00
sla     None
start_date  2019-07-11T08:53:32.593360+00:00
task_concurrency    None
task_id     start
task_type   DummyOperator
template_ext    []
template_fields     ()
trigger_rule    all_success
ui_color    #e8f7e4
ui_fgcolor  #000
upstream_list   []
upstream_task_ids   set([])
wait_for_downstream     False
weight_rule     downstream

airflow@e3bc9a0a7a3e:~$ airflow trigger_dag dummy_dag -e 20190702
dag = DAG(dag_id='dummy_dag',
          start_date=datetime(2019, 7, 11, 0, 0))