From dcf3bc3fbc934871084b99c527c3c3dc611993bb Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Thu, 15 Aug 2013 01:50:26 +0200 Subject: [PATCH] just some threshold fixes --- lib/core/job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/job.py b/lib/core/job.py index 39873ba..bf4a474 100644 --- a/lib/core/job.py +++ b/lib/core/job.py @@ -33,11 +33,13 @@ class Job: def handle_threshold(self, serviceThreshold, executionSucessful): if executionSucessful: - pass + if self.jobThreshold > 0: + self.jobThreshold -= 1 else: self.jobThreshold += 1 if self.jobThreshold >= serviceThreshold: + self.log.d("ARGGHHH!!") self.handle_alarm(self.jobThreshold-serviceThreshold) def handle_alarm(self, threholdOffset):