Perform handshakes asynchronously

This commit is contained in:
2022-10-11 06:55:34 +10:30
parent 8046f04e33
commit 10ff26b17f
4 changed files with 45 additions and 14 deletions

View File

@@ -5,7 +5,7 @@ class CheckReporter:
def __init__(self):
self.checks = list()
def add_check(self, check):
def append(self, check):
self.checks.append(check)
def failed(self):
@@ -43,8 +43,8 @@ class JSONReporter(CheckReporter):
class DefaultReporter(CheckReporter):
def add_check(self, check):
super().add_check(check)
def append(self, check):
super().append(check)
result = f"[{'PASS' if check.check_successful else 'FAIL'}] Check host {check.hostname}"
if check.debug:
result += f" - {check.debug}"