[12.10.20] Testing

This commit is contained in:
andrewso 2020-10-12 15:38:21 +01:00
parent b7bdeb22f9
commit c4b57a7e0f

View File

@ -171,12 +171,12 @@ def createHourJob():
global timeF global timeF
timeF = timeFunction() timeF = timeFunction()
# processTweet() processStack = hourStack.copy()
log("Extracting sentiment scores...", 'INFO') log("Extracting sentiment scores...", 'INFO')
if len(hourStack) != 0: if len(processStack) != 0:
log("Process stack size is :: [{}]".format(len(hourStack)), 'INFO') log("Process stack size is :: [{}]".format(len(processStack)), 'INFO')
for item in hourStack: for item in hourStack:
ovPos = ovPos + item['pos'] ovPos = ovPos + item['pos']
ovNeu = ovNeu + item['neu'] ovNeu = ovNeu + item['neu']
@ -184,10 +184,10 @@ def createHourJob():
ovCompound = ovCompound + item['compound'] ovCompound = ovCompound + item['compound']
type = item["type"] type = item["type"]
pos = round(ovPos/len(hourStack), 3) pos = round(ovPos/len(processStack), 3)
neu = round(ovNeu/len(hourStack), 3) neu = round(ovNeu/len(processStack), 3)
neg = round(ovNeg/len(hourStack), 3) neg = round(ovNeg/len(processStack), 3)
compound = round(ovCompound/len(hourStack), 3) compound = round(ovCompound/len(processStack), 3)
if type == "bitcoin": if type == "bitcoin":
type = 'btc_usd' type = 'btc_usd'