added health check support

This commit is contained in:
2023-06-05 23:51:49 -05:00
parent a0ce03335d
commit cf64321e49
2 changed files with 13 additions and 1 deletions

View File

@@ -84,4 +84,10 @@ def get_script_runtime(self):
if self.use_pushover:
self.extm = f"Execution time: [{elapsed_time}]"
if self.use_apprise:
self.extm = f"Execution time: [{elapsed_time}]"
self.extm = f"Execution time: [{elapsed_time}]"
def send_ping(self, req_obj, healthcheck_url):
try:
req_obj.get(healthcheck_url, timeout=10)
except req_obj.RequestException as e:
self.tl.info(f"Ping failed: {e}")