Add status check for auth endpoint
This commit is contained in:
parent
0dfb6806e3
commit
e44a503bd0
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
from app import build_logs, storage
|
from app import build_logs, storage, authentication
|
||||||
from health.models_pre_oci import pre_oci_model as model
|
from health.models_pre_oci import pre_oci_model as model
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -46,12 +46,18 @@ def _check_storage(app):
|
||||||
logger.exception('Storage check failed with exception %s', ex)
|
logger.exception('Storage check failed with exception %s', ex)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def _check_auth(app):
|
||||||
|
""" Returns the status of the auth engine, as accessed from this instance. """
|
||||||
|
(status, _) = authentication.ping()
|
||||||
|
return status
|
||||||
|
|
||||||
|
|
||||||
_SERVICES = {
|
_SERVICES = {
|
||||||
'registry_gunicorn': _check_registry_gunicorn,
|
'registry_gunicorn': _check_registry_gunicorn,
|
||||||
'database': _check_database,
|
'database': _check_database,
|
||||||
'redis': _check_redis,
|
'redis': _check_redis,
|
||||||
'storage': _check_storage,
|
'storage': _check_storage,
|
||||||
|
'auth': _check_auth,
|
||||||
}
|
}
|
||||||
|
|
||||||
def check_all_services(app, skip):
|
def check_all_services(app, skip):
|
||||||
|
|
Reference in a new issue