clear topic stats before load
This commit is contained in:
parent
3f0ab5bdc2
commit
944af4e96c
|
@ -171,6 +171,12 @@ class TopicStat:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
async def load_stat(session):
|
async def load_stat(session):
|
||||||
self = TopicStat
|
self = TopicStat
|
||||||
|
|
||||||
|
self.shouts_by_topic = {}
|
||||||
|
self.authors_by_topic = {}
|
||||||
|
self.subs_by_topic = {}
|
||||||
|
self.views_by_topic = {}
|
||||||
|
|
||||||
shout_topics = session.query(ShoutTopic)
|
shout_topics = session.query(ShoutTopic)
|
||||||
for shout_topic in shout_topics:
|
for shout_topic in shout_topics:
|
||||||
topic = shout_topic.topic
|
topic = shout_topic.topic
|
||||||
|
|
Loading…
Reference in New Issue
Block a user