Commit 7b1cd136 authored by Alain Takoudjou's avatar Alain Takoudjou

promise: disable test check for some promises

This promises are used in caddy-frontend to check slave frontend status. We don't want to run them everytime buildout will deploy frontend because:
- there is too many slaves, check all slave frontend promises while deploying frontend will slow down slave frontend deployment.
- we don't want to reprocess frontend if one of slave frontend promise is failing
parent 55ad3276
...@@ -14,6 +14,8 @@ class RunPromise(GenericPromise): ...@@ -14,6 +14,8 @@ class RunPromise(GenericPromise):
# set periodicity to run the promise twice per day # set periodicity to run the promise twice per day
self.custom_frequency = int(self.getConfig('frequency', 720)) self.custom_frequency = int(self.getConfig('frequency', 720))
self.setPeriodicity(self.custom_frequency) self.setPeriodicity(self.custom_frequency)
# Skip test check on this promise
self.setTestLess()
def sense(self): def sense(self):
""" """
...@@ -82,6 +84,3 @@ class RunPromise(GenericPromise): ...@@ -82,6 +84,3 @@ class RunPromise(GenericPromise):
def anomaly(self): def anomaly(self):
# only check the result of the two latest sense call # only check the result of the two latest sense call
return self._test(result_count=2, failure_amount=2, latest_minute=self.custom_frequency*3) return self._test(result_count=2, failure_amount=2, latest_minute=self.custom_frequency*3)
def test(self):
return TestResult(message="")
...@@ -14,6 +14,8 @@ class RunPromise(GenericPromise): ...@@ -14,6 +14,8 @@ class RunPromise(GenericPromise):
# set periodicity to run the promise twice per day # set periodicity to run the promise twice per day
self.custom_frequency = int(self.getConfig('frequency', 720)) self.custom_frequency = int(self.getConfig('frequency', 720))
self.setPeriodicity(self.custom_frequency) self.setPeriodicity(self.custom_frequency)
# Skip test check on this promise
self.setTestLess()
def sense(self): def sense(self):
""" """
...@@ -46,6 +48,3 @@ class RunPromise(GenericPromise): ...@@ -46,6 +48,3 @@ class RunPromise(GenericPromise):
def anomaly(self): def anomaly(self):
# only check the result of the two latest sense call # only check the result of the two latest sense call
return self._test(result_count=2, failure_amount=2, latest_minute=self.custom_frequency*3) return self._test(result_count=2, failure_amount=2, latest_minute=self.custom_frequency*3)
def test(self):
return TestResult(message="")
...@@ -14,6 +14,8 @@ class RunPromise(GenericPromise): ...@@ -14,6 +14,8 @@ class RunPromise(GenericPromise):
# set periodicity to run the promise twice per day # set periodicity to run the promise twice per day
self.custom_frequency = int(self.getConfig('frequency', 720)) self.custom_frequency = int(self.getConfig('frequency', 720))
self.setPeriodicity(self.custom_frequency) self.setPeriodicity(self.custom_frequency)
# Skip test check on this promise
self.setTestLess()
def sense(self): def sense(self):
""" """
...@@ -64,6 +66,3 @@ class RunPromise(GenericPromise): ...@@ -64,6 +66,3 @@ class RunPromise(GenericPromise):
def anomaly(self): def anomaly(self):
# only check the result of the two latest sense call # only check the result of the two latest sense call
return self._test(result_count=2, failure_amount=2, latest_minute=self.custom_frequency*3) return self._test(result_count=2, failure_amount=2, latest_minute=self.custom_frequency*3)
def test(self):
return TestResult(message="")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment