This repository has been archived on 2023-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
automated-youtube-dl/server/health.py

19 lines
471 B
Python

def health_check_one() -> (bool, any):
return True, 'testing123'
def health_check_two() -> (bool, any):
return True, 'banana'
def run_all_functions():
results = {}
exit_code = 'ok'
for name, func in globals().items():
if callable(func) and func.__name__ != "run_all_functions":
success, data = func()
if not success:
exit_code = 'crit'
results[name] = data
return exit_code, results