Remove system message in stat

This commit is contained in:
Mickael 2019-06-16 11:02:24 +02:00
parent d5961c0d71
commit bd1d3b857d
2 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -88,7 +88,8 @@ while True:
begindate = begin.isoformat()
enddate = end.isoformat()
resultMess = rocket.channels_history(channel['_id'], oldest= begindate, latest=enddate, count= 10000).json()
lenght = len(resultMess['messages'])
resultMess = list(filter(lambda mess: 't' not in mess, resultMess['messages']))
lenght = len(resultMess)
dataMess.append(lenght)
if lenght > 0:
@ -104,7 +105,7 @@ while True:
messagesDataTsunamy['technology'][id] += lenght
users = []
for mess in resultMess['messages']:
for mess in resultMess:
users.append(mess['u']['_id'])
usersDistinct = set(users)
dataUsers.append(len(usersDistinct))