From 651bea1cd4c3923c72e8dfbaadb68406dfc7f2da Mon Sep 17 00:00:00 2001 From: andrewso <9V5f1FkzI2LD> Date: Fri, 9 Oct 2020 19:49:13 +0100 Subject: [PATCH] [09.10.20] Connection testing --- src/utils/sentimentAnalyser.py | 3 +-- src/utils/spamFilter.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/sentimentAnalyser.py b/src/utils/sentimentAnalyser.py index 47a81c1..314112b 100644 --- a/src/utils/sentimentAnalyser.py +++ b/src/utils/sentimentAnalyser.py @@ -10,13 +10,12 @@ class keys(): self.sentiment_analyser_uri = os.getenv("SENTIMENT_URL") def callSentimentAnalyser(tweet): - log("Calling Sentiment Analyser", 'INFO') + log("Calling Sentiment Analyser for {}".format(tweet), 'INFO') try: uri = keys().sentiment_analyser_uri + "/sentiment?tweet="+tweet response = requests.request("GET", uri) response = json.loads(response.text) - print(response["result"]["Score"]) scores = response["result"]["Score"] diff --git a/src/utils/spamFilter.py b/src/utils/spamFilter.py index 2be4e7b..059107d 100644 --- a/src/utils/spamFilter.py +++ b/src/utils/spamFilter.py @@ -15,7 +15,8 @@ def callSpamFilter(tweet): response = requests.request("GET", uri) response = json.loads(response.text) - print(response["result"]) + + log("Spam Filter result for {} is {}".format(tweet, response["result"]), 'INFO') return response["result"] except: