Switch health to use a data interface
This commit is contained in:
parent
ca5a47edad
commit
4853634c2f
3 changed files with 22 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
import logging
|
||||
from data.model import health
|
||||
from app import build_logs, storage
|
||||
from health.models_pre_oci import pre_oci_model as model
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -27,10 +27,9 @@ 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 health.check_health(app.config)
|
||||
return model.check_health(app.config)
|
||||
|
||||
def _check_redis(app):
|
||||
""" Returns the status of Redis, as accessed from this instance. """
|
||||
|
|
Reference in a new issue