watchd: introduce configurable 'outage_threshold'

This commit is contained in:
rofl0r
2019-01-18 15:34:49 +00:00
parent aaac14d34e
commit ddee92d20f
3 changed files with 3 additions and 1 deletions

View File

@@ -286,7 +286,7 @@ class Proxywatchd():
success_rate = (float(sc) / len(self.collected)) * 100
ret = True
if len(self.collected) >= 100 and success_rate <= 2.0:
if len(self.collected) >= 100 and success_rate <= config.watchd.outage_threshold:
_log("WATCHD %.2f%% SUCCESS RATE - tor circuit blocked? won't submit fails"%success_rate, "ERROR")
if sc == 0: return False
args = []