initial implementation of a health check route (#1262)

* initial implementation of a health check route

* remove debugging code

* lint
This commit is contained in:
Bruce Martin
2020-03-20 14:21:32 -07:00
committed by GitHub
parent 040dbd3a95
commit de006f8f91
2 changed files with 36 additions and 0 deletions
+7
View File
@@ -14,6 +14,7 @@ import server.common.rest as common_rest
from server.common.errors import DatasetAccessError
from server.common.utils import path_join, Float32JSONEncoder
from server.common.data_locator import DataLocator
from server.common.health import health_check
from server.data_common.matrix_loader import MatrixDataLoader
from functools import wraps
@@ -48,6 +49,12 @@ def favicon():
return send_from_directory(os.path.join(webbp.root_path, "static/img/"), "favicon.png")
@webbp.route("/health")
def health():
config = current_app.app_config
return health_check(config)
def get_data_adaptor(dataset=None):
config = current_app.app_config