This commit is contained in:
parent
a3688ba29a
commit
0ebea28cce
|
@ -60,6 +60,7 @@ type AuthorStat {
|
||||||
rating_shouts: Int
|
rating_shouts: Int
|
||||||
rating_comments: Int
|
rating_comments: Int
|
||||||
commented: Int
|
commented: Int
|
||||||
|
viewed: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type Author {
|
type Author {
|
||||||
|
@ -172,6 +173,7 @@ type TopicStat {
|
||||||
shouts: Int!
|
shouts: Int!
|
||||||
followers: Int!
|
followers: Int!
|
||||||
authors: Int!
|
authors: Int!
|
||||||
|
viewed: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type Topic {
|
type Topic {
|
||||||
|
|
|
@ -119,7 +119,7 @@ class ViewedStorage:
|
||||||
with open("/dump/views.json", "r") as file:
|
with open("/dump/views.json", "r") as file:
|
||||||
precounted_views = json.load(file)
|
precounted_views = json.load(file)
|
||||||
self.views_by_shout.update(precounted_views)
|
self.views_by_shout.update(precounted_views)
|
||||||
logger.info(f" * {len(precounted_views)} pre-counted views loaded successfully.")
|
logger.info(f" * {len(precounted_views)} pre-counted shouts' views loaded successfully.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error loading pre-counted views: {e}")
|
logger.error(f"Error loading pre-counted views: {e}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user