fixes-wip
This commit is contained in:
parent
142202b58a
commit
bfdfa35bc9
|
@ -216,6 +216,7 @@ input ShoutsBy {
|
||||||
title: String
|
title: String
|
||||||
body: String
|
body: String
|
||||||
topic: String
|
topic: String
|
||||||
|
topics: [String]
|
||||||
author: String
|
author: String
|
||||||
layout: String
|
layout: String
|
||||||
visibility: String
|
visibility: String
|
||||||
|
@ -226,6 +227,7 @@ input ShoutsBy {
|
||||||
|
|
||||||
input ReactionBy {
|
input ReactionBy {
|
||||||
shout: String
|
shout: String
|
||||||
|
shouts: [String]
|
||||||
body: String
|
body: String
|
||||||
topic: String
|
topic: String
|
||||||
author: String
|
author: String
|
||||||
|
|
|
@ -51,11 +51,14 @@ class ViewStat:
|
||||||
async with self.lock:
|
async with self.lock:
|
||||||
self.by_topics = await redis.execute("GET", "views_by_topics")
|
self.by_topics = await redis.execute("GET", "views_by_topics")
|
||||||
if self.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")
|
self.by_slugs = await redis.execute("GET", "views_by_shouts")
|
||||||
if self.by_slugs:
|
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)
|
domains = await self.client.execute_async(query_ackee_views)
|
||||||
print("[stat.ackee] loaded domains")
|
print("[stat.ackee] loaded domains")
|
||||||
print(domains)
|
print(domains)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user