仍然无法与人工智能并行运行所有任务

2024-04-19 12:43:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我的任务设置为this question。在

根据UI,依赖关系似乎定义良好:

enter image description here

我测试了如下的单个任务:airflow test capone_dash_preproc AAAG5608078M2 2017-07-25。这非常有效,更新与该用户对应的目标数据库条目。然而,当我试图运行整个任务时,它似乎被挂断了。python3 dash_dag.py基本上在web服务器上产生以下终端输出,无休止地重复。所有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
...

我的困惑来自于这样一个事实:单个测试运行良好,并且填充了数据库。它是整个运行挂起和失败。有什么明显的吗?在


Tags: pyinfoflaskcachesignallibpackagesusr
1条回答
网友
1楼 · 发布于 2024-04-19 12:43:26

气流由多个部件组成。最重要的是调度器、webserver和worker(在水平伸缩的情况下)。调度程序总是*需要运行才能让气流执行任务。web服务器只是为了在调度器正在做的事情上以及restapi上提供一个漂亮的UI。所有组件都使用备份数据库。在

您显示的是web服务器的输出,而我本来希望看到调度程序的输出。从你发布的截图和你运行DAG的方式来看,我的假设是你没有启动它。在

因此,通过在命令行上发出airflow scheduler启动调度程序,您的DAG可能会启动。在

*回填是一个例外

相关问题 更多 >