Repository: incubator-airflow
Updated Branches:
  refs/heads/master 6825d97b8 -> fa84d4999


[AIRFLOW-1492] Add gauge for task successes/failures

Closes #2504 from saguziel/aguziel-add-task-stat


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/fa84d499
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/fa84d499
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/fa84d499

Branch: refs/heads/master
Commit: fa84d49997e96826c848aa39083acfe135a46b7f
Parents: 6825d97
Author: Alex Guziel <alex.guz...@airbnb.com>
Authored: Wed Aug 9 18:21:15 2017 -0700
Committer: Alex Guziel <alex.guz...@airbnb.com>
Committed: Wed Aug 9 18:21:15 2017 -0700

----------------------------------------------------------------------
 airflow/models.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/fa84d499/airflow/models.py
----------------------------------------------------------------------
diff --git a/airflow/models.py b/airflow/models.py
index 45bcdc7..35a09ef 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -1446,6 +1446,7 @@ class TaskInstance(Base):
 
                 Stats.incr('operator_successes_{}'.format(
                     self.task.__class__.__name__), 1, 1)
+                Stats.incr('ti_successes')
             self.state = State.SUCCESS
         except AirflowSkipException:
             self.state = State.SKIPPED
@@ -1486,6 +1487,7 @@ class TaskInstance(Base):
         self.end_date = datetime.now()
         self.set_duration()
         Stats.incr('operator_failures_{}'.format(task.__class__.__name__), 1, 
1)
+        Stats.incr('ti_failures')
         if not test_mode:
             session.add(Log(State.FAILED, self))
 

Reply via email to