From 0ebea28cce1dc74c167e9458cb508e0f5547743a Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 22 Jan 2024 21:38:38 +0300 Subject: [PATCH] schema-upgrade --- schemas/core.graphql | 2 ++ services/viewed.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/schemas/core.graphql b/schemas/core.graphql index a17582d1..2d555fbd 100644 --- a/schemas/core.graphql +++ b/schemas/core.graphql @@ -60,6 +60,7 @@ type AuthorStat { rating_shouts: Int rating_comments: Int commented: Int + viewed: Int } type Author { @@ -172,6 +173,7 @@ type TopicStat { shouts: Int! followers: Int! authors: Int! + viewed: Int } type Topic { diff --git a/services/viewed.py b/services/viewed.py index 26ca759f..f6469b7c 100644 --- a/services/viewed.py +++ b/services/viewed.py @@ -119,7 +119,7 @@ class ViewedStorage: with open("/dump/views.json", "r") as file: precounted_views = json.load(file) 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: logger.error(f"Error loading pre-counted views: {e}")