【发布时间】:2017-07-25 22:35:04
【问题描述】:
我有在this question 中设置的任务。
从 UI 看来,依赖项定义良好:
我已按如下方式测试了单个任务:airflow test capone_dash_preproc AAAG5608078M2 2017-07-25。这很好用,更新与该用户对应的目标数据库条目。但是,当我尝试运行完整任务时,它似乎被挂断了。 python3 dash_dag.py 基本上会在网络服务器上导致以下终端输出,无休止地重复。所有 CPU 都是安静的,所以似乎没有发生太多计算:
/usr/local/lib/python3.6/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
[2017-07-25 16:48:23,266] [58627] {models.py:167} INFO - Filling up the DagBag from /Users/aaronpolhamus/airflow/dags
[2017-07-25 16:48:25 -0500] [58487] [INFO] Handling signal: ttou
[2017-07-25 16:49:13 -0500] [58557] [INFO] Worker exiting (pid: 58557)
[2017-07-25 16:49:44 -0500] [58487] [INFO] Handling signal: ttin
[2017-07-25 16:49:44 -0500] [58642] [INFO] Booting worker with pid: 58642
/usr/local/lib/python3.6/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
[2017-07-25 16:49:44,607] [58642] {models.py:167} INFO - Filling up the DagBag from /Users/aaronpolhamus/airflow/dags
[2017-07-25 16:49:46 -0500] [58487] [INFO] Handling signal: ttou
[2017-07-25 16:50:21 -0500] [58568] [INFO] Worker exiting (pid: 58568)
[2017-07-25 16:50:51 -0500] [58487] [INFO] Handling signal: ttin
[2017-07-25 16:50:51 -0500] [58661] [INFO] Booting worker with pid: 58661
/usr/local/lib/python3.6/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
[2017-07-25 16:50:52,324] [58661] {models.py:167} INFO - Filling up the DagBag from /Users/aaronpolhamus/airflow/dags
[2017-07-25 16:50:54 -0500] [58487] [INFO] Handling signal: ttou
[2017-07-25 16:51:20 -0500] [58596] [INFO] Worker exiting (pid: 58596)
[2017-07-25 16:51:50 -0500] [58487] [INFO] Handling signal: ttin
[2017-07-25 16:51:50 -0500] [58677] [INFO] Booting worker with pid: 58677
...
我的困惑源于单个测试运行良好并填充数据库这一事实。挂起和失败的是整个运行。这里有什么明显的吗?
【问题讨论】:
-
你试过类似
airflow backfill capone_dash_preproc -s YYYYMMDD -e YYYYMMDD -
嗨@Chengzhi,还没有。为什么这可能会解决问题?我应该在尚未尝试跑步的日期执行此操作吗?
-
嘿,@Aaron,它不依赖于调度程序,因此您可以测试是否所有任务都可以运行。您可以清除已运行的任务,然后也可以回填。
标签: python python-3.x airflow apache-airflow