Add instance key ID to the health check endpoint

Fixes #1429
This commit is contained in:
Joseph Schorr 2016-07-05 14:14:22 -04:00
parent 781f2eec72
commit 7fddc61b8f
2 changed files with 11 additions and 9 deletions

View file

@ -12,7 +12,7 @@ from flask.ext.login import current_user
import features
from app import (app, billing as stripe, build_logs, avatar, signer, log_archive, config_provider,
get_app_url)
get_app_url, instance_keys)
from auth import scopes
from auth.auth import require_session_login, process_oauth, has_basic_auth, process_auth_or_cookie
from auth.permissions import (AdministerOrganizationPermission, ReadRepositoryPermission,
@ -234,7 +234,7 @@ def privacy():
@web.route('/health/instance', methods=['GET'])
@no_cache
def instance_health():
checker = get_healthchecker(app, config_provider)
checker = get_healthchecker(app, config_provider, instance_keys)
(data, status_code) = checker.check_instance()
response = jsonify(dict(data=data, status_code=status_code))
response.status_code = status_code
@ -246,7 +246,7 @@ def instance_health():
@web.route('/health/endtoend', methods=['GET'])
@no_cache
def endtoend_health():
checker = get_healthchecker(app, config_provider)
checker = get_healthchecker(app, config_provider, instance_keys)
(data, status_code) = checker.check_endtoend()
response = jsonify(dict(data=data, status_code=status_code))
response.status_code = status_code