Commit 7b1cd136 by 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
1 parent 55ad3276
......@@ -14,6 +14,8 @@ class RunPromise(GenericPromise):
# set periodicity to run the promise twice per day
self.custom_frequency = int(self.getConfig('frequency', 720))
self.setPeriodicity(self.custom_frequency)
# Skip test check on this promise
self.setTestLess()
def sense(self):
"""
......@@ -82,6 +84,3 @@ class RunPromise(GenericPromise):
def anomaly(self):
# 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)
def test(self):
return TestResult(message="")
......@@ -14,6 +14,8 @@ class RunPromise(GenericPromise):
# set periodicity to run the promise twice per day
self.custom_frequency = int(self.getConfig('frequency', 720))
self.setPeriodicity(self.custom_frequency)
# Skip test check on this promise
self.setTestLess()
def sense(self):
"""
......@@ -46,6 +48,3 @@ class RunPromise(GenericPromise):
def anomaly(self):
# 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)
def test(self):
return TestResult(message="")
......@@ -14,6 +14,8 @@ class RunPromise(GenericPromise):
# set periodicity to run the promise twice per day
self.custom_frequency = int(self.getConfig('frequency', 720))
self.setPeriodicity(self.custom_frequency)
# Skip test check on this promise
self.setTestLess()
def sense(self):
"""
......@@ -64,6 +66,3 @@ class RunPromise(GenericPromise):
def anomaly(self):
# 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)
def test(self):
return TestResult(message="")
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!