From 96b092f0ebc61e73965019ab9168b790191126ee Mon Sep 17 00:00:00 2001 From: Bruce Martin Date: Mon, 23 Mar 2020 16:13:32 -0600 Subject: [PATCH] fix health root exception (#1283) * fix health root exception * remove extraneous lambda --- server/common/health.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/common/health.py b/server/common/health.py index a12b4a35..f46e5960 100644 --- a/server/common/health.py +++ b/server/common/health.py @@ -23,7 +23,11 @@ def health_check(config): """ health = {"status": None, "version": "1", "releaseID": cellxgene_version} - checks = [_is_accessible(config.datapath), _is_accessible(config.dataroot)] + checks = [ + (config.single_dataset__datapath is not None or config.multi_dataset__dataroot is not None), + _is_accessible(config.single_dataset__datapath), + _is_accessible(config.multi_dataset__dataroot), + ] health["status"] = "pass" if all(checks) else "fail" code = HTTPStatus.OK if health["status"] == "pass" else HTTPStatus.BAD_REQUEST return make_response(jsonify(health), code, {"Content-Type": "application/health+json"},)