fixes-wip

This commit is contained in:
tonyrewin 2022-11-15 18:20:44 +03:00
parent 142202b58a
commit bfdfa35bc9
2 changed files with 8 additions and 3 deletions

View File

@ -216,6 +216,7 @@ input ShoutsBy {
title: String
body: String
topic: String
topics: [String]
author: String
layout: String
visibility: String
@ -226,6 +227,7 @@ input ShoutsBy {
input ReactionBy {
shout: String
shouts: [String]
body: String
topic: String
author: String

View File

@ -51,11 +51,14 @@ class ViewStat:
async with self.lock:
self.by_topics = await redis.execute("GET", "views_by_topics")
if self.by_topics:
self.by_topics = json.loads(self.by_topics)
self.by_topics = dict(json.loads(self.by_topics))
else:
self.by_topics = {}
self.by_slugs = await redis.execute("GET", "views_by_shouts")
if self.by_slugs:
self.by_slugs = json.loads(self.by_slugs)
self.by_slugs = dict(json.loads(self.by_slugs))
else:
self.by_slugs = {}
domains = await self.client.execute_async(query_ackee_views)
print("[stat.ackee] loaded domains")
print(domains)