如果同时触发同一个 dag(或者运行时间重叠)会怎样?
询问是因为最近手动触发了一个 dag,当它的实际计划运行时间过去时,它最终仍在运行,此时,从网络服务器 UI 的角度来看,它又从头开始运行(我无法不再跟踪前一个实例)。这只是“运行实例”使 dag_id 过载的情况,还是作业真正重新启动(即先前的进程被终止)?
请您参考如下方法:
据我了解,这取决于触发方式以及 DAG 是否有时间表。如果它基于 DAG 中定义的计划,比如每天运行的任务未完成/仍在工作,并且您单击重新运行,那么该任务的实例将重新运行。即今天的那个。同样,如果频率是任何其他时间单位。
- 如果您想重新运行其他实例,您需要将它们从 @lars-haughseth 在不同的版本中描述的以前的工作 问题。 airflow-re-run-dag-from-beginning-with-new-schedule
- 如果您触发 DAG 运行,那么它将获得触发器执行 时间戳和运行将单独显示到计划 运行。如此处的文档中所述。 external-triggers documentation
Note that DAG Runs can also be created manually through the CLI while running an airflow trigger_dag command, where you can define a specific run_id. The DAG Runs created externally to the scheduler get associated to the trigger’s timestamp, and will be displayed in the UI alongside scheduled DAG runs.
在您的例子中,听起来像是后者。希望对您有所帮助。
