From a7994d704d905431a7e2aa62d7a1a7e105e01585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sun, 6 Dec 2020 11:15:11 +0100 Subject: [PATCH] update helathcheck --- model_service/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model_service/app.py b/model_service/app.py index 56c26e8..65a2f07 100644 --- a/model_service/app.py +++ b/model_service/app.py @@ -48,7 +48,7 @@ app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False # initialize stuff db.init_app(app) storage.init_app(app) -health = HealthCheck(app, "/healthz") +health = HealthCheck() @app.before_first_request @@ -64,6 +64,7 @@ for view in [SVMView, CNNView, RootView]: view.register(app, trailing_slash=False, route_prefix='/model') health.add_check(health_database_status) +app.add_url_rule("/healthz", "healthcheck", view_func=lambda: health.run()) # start debuggig if needed if __name__ == "__main__":