Skip to content

Commit

Permalink
Fix dag duration metric
Browse files Browse the repository at this point in the history
  • Loading branch information
jward-bw committed Apr 1, 2020
1 parent 078a151 commit 9f14b17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions airflow_prometheus_exporter/prometheus_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def get_dag_duration_info():
),
),
)
.filter(
TaskInstance.start_date.isnot(None),
TaskInstance.end_date.isnot(None),
)
.group_by(
max_execution_dt_query.c.dag_id,
max_execution_dt_query.c.max_execution_dt,
Expand All @@ -120,10 +124,6 @@ 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

0 comments on commit 9f14b17

Please sign in to comment.