diff --git a/src/main.py b/src/main.py index eea9d13..d21cc1c 100644 --- a/src/main.py +++ b/src/main.py @@ -27,6 +27,10 @@ def tweetPredict(): return json.dumps({'result': result, 'tweet': tweet}), 200, {'ContentType':'application/json'} +@app.route('/sentimentProbeTest', methods=['GET']) +def sentimentProbeTrst(): + return json.dumps({'result': {'Score': {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0}, 'Compound': 0.0}, 'tweet': 'Fake Text'}), 200, {'ContentType':'application/json'} + def callSentimentAnalyser(): analyser.set_newSentiment() @@ -43,5 +47,4 @@ if __name__ == '__main__': Thread(target=callProbes).start() - Thread(target=callSentimentAnalyser).start() - # Thread(target=callNewsFilter).start() \ No newline at end of file + Thread(target=callSentimentAnalyser).start() \ No newline at end of file diff --git a/src/probes/probes.py b/src/probes/probes.py index a01b2ac..83b6fb8 100644 --- a/src/probes/probes.py +++ b/src/probes/probes.py @@ -13,7 +13,7 @@ def health(): @app.route('/readiness') def readiness(): - result = requests.request("GET", 'http://0.0.0.0:9090/sentiment?tweet=Bitcoin%20is%20doing%20very%20well') + result = requests.request("GET", 'http://0.0.0.0:9090/sentimentProbeTest') result = json.loads(result.text) if result != "" :