Skip to content

Commit

Permalink
Don't include tasks with no start date
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek Ray committed Mar 11, 2020
1 parent 43862bf commit 078a151
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion airflow_prometheus_exporter/prometheus_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def get_dag_duration_info():
== dag_start_dt_query.c.execution_date,
),
)
.filter(
TaskInstance.start_date.isnot(None),
TaskInstance.end_date.isnot(None),
)
.all()
)

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


class RBACMetrics(FABBaseView):
route_base = "/admin/metrics/"

Expand Down

0 comments on commit 078a151

Please sign in to comment.