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__":