From 627c80f0111331c35c4e8825b5fae787f19d57d4 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Tue, 6 Feb 2024 13:08:51 +0300 Subject: [PATCH 1/2] chore: add healthcheck endpoint --- snappass/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snappass/main.py b/snappass/main.py index 6cfcd4f1..b134983a 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -214,6 +214,11 @@ def show_password(password_key): return render_template('password.html', password=password) +@app.route('/healthcheck', methods=['GET']) +def get_healthcheck(): + return {'result': 'I\'m not a Barbie girl, and this isn\'t a Barbie world, WAKE UP!'} + + @check_redis_alive def main(): app.run(host='0.0.0.0') From 42127b74e58877c5ea4cf2e369075b40419d3c42 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Tue, 6 Feb 2024 14:58:19 +0300 Subject: [PATCH 2/2] chore: update healthcheck message --- snappass/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snappass/main.py b/snappass/main.py index b134983a..bd04299b 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -216,7 +216,7 @@ def show_password(password_key): @app.route('/healthcheck', methods=['GET']) def get_healthcheck(): - return {'result': 'I\'m not a Barbie girl, and this isn\'t a Barbie world, WAKE UP!'} + return {'result': 'I\'m working👍'} @check_redis_alive