logs-fixes

This commit is contained in:
2022-11-22 09:20:01 +03:00
parent 8b0a5ed035
commit 11710218b9
3 changed files with 25 additions and 20 deletions

View File

@@ -102,12 +102,15 @@ class ViewedStorage:
@staticmethod
async def init():
self = ViewedStorage
async with self.lock:
self.client = create_client({
"Authorization": "Bearer %s" % str(token)
}, schema=schema_str)
print("[stat.viewed] authorized permanentely by ackee.discours.io: %s" % token)
if token:
self = ViewedStorage
async with self.lock:
self.client = create_client({
"Authorization": "Bearer %s" % str(token)
}, schema=schema_str)
print("[stat.viewed] authorized permanentely by ackee.discours.io: %s" % token)
else:
print("[stat.viewed] please, set ACKEE_TOKEN")
@staticmethod
async def update(session):