Commit 5f914986 authored by Pablo Panero's avatar Pablo Panero
Browse files

Refactor: Health check blueprint added via setup.py. Default blueprint...

Refactor: Health check blueprint added via setup.py. Default blueprint disabled as agreed in PR:invenio-app#36
parent 24cd4431
......@@ -114,8 +114,7 @@ RECORDS_REST_ENDPOINTS = dict(
# ===
RATELIMIT_DEFAULT = os.getenv('CERN_SEARCH_INSTANCE_RATELIMIT', '5000/hour')
APP_HEALTH_BLUEPRINT_ENABLED = True
APP_HEALTH_BLUEPRINT = 'cern_search_rest_api.modules.cernsearch.views:build_health_blueprint'
APP_HEALTH_BLUEPRINT_ENABLED = False
# Flask Security
# ==============
......
......@@ -14,7 +14,6 @@ class CERNSearch(object):
"""Flask application initialization."""
self.init_config(app)
blueprint = build_blueprint(app)
app.register_blueprint(build_health_blueprint())
app.register_blueprint(blueprint)
app.extensions["cern-search"] = self
......
......@@ -263,7 +263,7 @@ class UBQRecordListResource(ContentNegotiatedMethodView):
)
def build_health_blueprint():
def build_health_blueprint(app):
blueprint = Blueprint('health_check', __name__)
......
......@@ -108,6 +108,9 @@ setup(
],
'invenio_base.api_apps': [
'cern-search = cern_search_rest_api.modules.cernsearch.ext:CERNSearch'
],
'invenio_base.blueprints': [
'health_check = cern_search_rest_api.modules.cernsearch.views:build_health_blueprint'
]
},
extras_require=extras_require,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment