added threshold handling to job.py and config
This commit is contained in:
parent
7886e6f677
commit
ee5245eccb
2 changed files with 11 additions and 1 deletions
|
|
@ -73,7 +73,15 @@ class Job:
|
|||
def handle_threshold(self, jobInfo, serviceThreshold, executionSucessful):
|
||||
if executionSucessful:
|
||||
if self.jobThreshold > 0:
|
||||
self.jobThreshold -= 1
|
||||
#TODO: maybe set threshold_handling for each service optionally; will override core setting!
|
||||
if self.core["threshold_handling"] == "reset":
|
||||
# Reset counter to 0
|
||||
self.log.debug("Threshold Reset")
|
||||
self.jobThreshold = 0
|
||||
else:
|
||||
# Decrement the counter (default)
|
||||
self.log.debug("Threshold Decrement")
|
||||
self.jobThreshold -= 1
|
||||
else:
|
||||
self.jobThreshold += 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue