This commit is contained in:
Joseph Schorr 2017-07-11 13:48:55 +03:00
parent 4853634c2f
commit 7b1dfbb256
4 changed files with 14 additions and 8 deletions

View file

@ -2,7 +2,6 @@ import logging
from app import build_logs, storage
from health.models_pre_oci import pre_oci_model as model
logger = logging.getLogger(__name__)
@ -27,14 +26,17 @@ def _check_registry_gunicorn(app):
logger.exception('Exception when checking registry health: %s', registry_url)
return False
def _check_database(app):
""" Returns the status of the database, as accessed from this instance. """
return model.check_health(app.config)
def _check_redis(app):
""" Returns the status of Redis, as accessed from this instance. """
return build_logs.check_health()
def _check_storage(app):
""" Returns the status of storage, as accessed from this instance. """
try: