diff options
| author | Tom Ritter <tom@ritter.vg> | 2017-03-03 14:50:31 -0600 |
|---|---|---|
| committer | Tom Ritter <tom@ritter.vg> | 2017-03-03 14:50:31 -0600 |
| commit | 129b2869e2da66c3cc2b34e3fc1a0663283a44c7 (patch) | |
| tree | 24b5be5a26bc3636532c1b1af9451137ebdcc912 /jobstate.py | |
| parent | fe136533e9fcd25d1ad9b254e807b116fe4e2615 (diff) | |
Hopefully finally solve the bug about only getting success messages for state change alerts
Diffstat (limited to 'jobstate.py')
| -rw-r--r-- | jobstate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/jobstate.py b/jobstate.py index a8e6542..f3e7796 100644 --- a/jobstate.py +++ b/jobstate.py @@ -14,6 +14,8 @@ class JobState: self.NumFailures = 0 def markFailedAndNotify(self): + # Confusing: In this function 'self' represents the lastRunStatus + # and we know the current run has failed if self.CurrentStateSuccess: self.CurrentStateSuccess = False self.FirstFailureTime = time.time() @@ -24,8 +26,9 @@ class JobState: self.NumFailures += 1 def markFailedNoNotify(self): + # Confusing: In this function 'self' represents the lastRunStatus + # and we know the current run has failed if self.CurrentStateSuccess: - logging.warn("Somehow we called markFailedNoNotify, on a success condition, without notifying the user") self.CurrentStateSuccess = False self.FirstFailureTime = time.time() self.LastNotifyTime = 0 @@ -34,6 +37,8 @@ class JobState: self.NumFailures += 1 def markSuccessful(self): + # Confusing: In this function 'self' represents the lastRunStatus + # and we know the current run has succeeded if self.CurrentStateSuccess: pass else: |
