Add http health-check for the api app

Also rename the 'elb' argument to 'simple' to be more descriptive.

The healthcheck is going to issue requests to `/_status?simple=true`
just to check that gunicorn is up and running - we don't need to go all
the way to the database, as this would have adverse impact when api is
under load.
This commit is contained in:
Athanasios Voutsadakis
2018-03-28 17:19:02 +01:00
parent 998863514e
commit 9888ba3d4e
2 changed files with 3 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ status = Blueprint('status', __name__)
@status.route('/_status', methods=['GET', 'POST'])
def show_status():
if request.args.get('elb', None):
if request.args.get('simple', None):
return jsonify(status="ok"), 200
else:
return jsonify(