diff --git a/checker_template.py b/checker_template.py index b43c5d3..bddd7e7 100644 --- a/checker_template.py +++ b/checker_template.py @@ -2,10 +2,12 @@ import random class CheckerTemplate: - def __init__(arguments): + # has `self` since checkers *should* have instances + # it's not actually needed here though since it's just static methods + def __init__(self, arguments): pass - def get_status(): + def get_status(self): latency = int(random.random() * 3000) if latency > 2500: # "simulate" a timeout return 0 @@ -14,5 +16,5 @@ class CheckerTemplate: else: return 100 - def get_return_codes(): + def get_return_codes(self): return {0: "Down", 50: "Partial outage", 100: "Up"}