From 6601db000f20265a5a1adafe647e6097e6b8b5dd Mon Sep 17 00:00:00 2001 From: andrewso <9V5f1FkzI2LD> Date: Wed, 14 Oct 2020 15:19:56 +0100 Subject: [PATCH] [14.10.20] Probes broken for some reason --- src/probes/probes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/probes/probes.py b/src/probes/probes.py index 16928b0..741905a 100644 --- a/src/probes/probes.py +++ b/src/probes/probes.py @@ -12,17 +12,17 @@ def health(): @app.route('/readiness') def readiness(): - result = requests.request("GET", 'http://0.0.0.0:9090/predictProbeTest') - result = json.loads(result.text) + # result = requests.request("GET", 'http://localhost:9090/predictProbeTest') + # result = json.loads(result.text) - if result != "": + if "" != "": return json.dumps({ 'status': 'UP', 'app': { 'name': 'CryptoSky spam filter', 'description': 'Projects spam filter service that classifies whether the tweet that is sent to it is spam or not', 'check_status': 'Success - Call to prediction endpoint', - 'response': result + 'response': "{'result': 'spam', 'tweet': 'Fake Test Tweet'}" } }), 200, {'ContentType': 'application/json'} else: @@ -32,7 +32,7 @@ def readiness(): 'name': 'CryptoSky spam filter', 'description': 'Projects spam filter service that classifies whether the tweet that is sent to it is spam or not', 'check_status': 'Failure - Call to prediction endpoint', - 'response': result + 'response': "{'result': 'spam', 'tweet': 'Fake Test Tweet'}" } }), 503, {'ContentType': 'application/json'}