Skip to content

Commit 078a151

Browse files
author
Abhishek Ray
committed
Don't include tasks with no start date
1 parent 43862bf commit 078a151

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

airflow_prometheus_exporter/prometheus_exporter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def get_dag_duration_info():
120120
== dag_start_dt_query.c.execution_date,
121121
),
122122
)
123+
.filter(
124+
TaskInstance.start_date.isnot(None),
125+
TaskInstance.end_date.isnot(None),
126+
)
123127
.all()
124128
)
125129

@@ -479,7 +483,6 @@ def collect(self):
479483
if RBAC:
480484
from flask_appbuilder import BaseView as FABBaseView, expose as FABexpose
481485

482-
483486
class RBACMetrics(FABBaseView):
484487
route_base = "/admin/metrics/"
485488

0 commit comments

Comments
 (0)