This commit is contained in:
parent
c67bcc8db1
commit
a7994d704d
@ -48,7 +48,7 @@ app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
|||||||
# initialize stuff
|
# initialize stuff
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
storage.init_app(app)
|
storage.init_app(app)
|
||||||
health = HealthCheck(app, "/healthz")
|
health = HealthCheck()
|
||||||
|
|
||||||
|
|
||||||
@app.before_first_request
|
@app.before_first_request
|
||||||
@ -64,6 +64,7 @@ for view in [SVMView, CNNView, RootView]:
|
|||||||
view.register(app, trailing_slash=False, route_prefix='/model')
|
view.register(app, trailing_slash=False, route_prefix='/model')
|
||||||
|
|
||||||
health.add_check(health_database_status)
|
health.add_check(health_database_status)
|
||||||
|
app.add_url_rule("/healthz", "healthcheck", view_func=lambda: health.run())
|
||||||
|
|
||||||
# start debuggig if needed
|
# start debuggig if needed
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user