storage-service/storage_service/utils/healthchecks.py
Torma Kristóf ddee056c25
All checks were successful
continuous-integration/drone/push Build is passing
add health endpoint
2020-11-19 01:49:40 +01:00

24 lines
482 B
Python

#!/usr/bin/env python3
from utils import storage
"""
Healthchek functions
"""
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, Birbnetes Team"
__module_name__ = "healthchecks"
__version__text__ = "1"
def health_database_status():
is_database_working = True
output = 'storage is ok'
try:
storage.connection.list_buckets()
except Exception as e:
output = str(e)
is_database_working = False
return is_database_working, output