get-author-id-by-user-id-2
All checks were successful
Deploy on push / deploy (push) Successful in 1m8s
All checks were successful
Deploy on push / deploy (push) Successful in 1m8s
This commit is contained in:
parent
b04fc1ba65
commit
1cc779e17b
|
@ -136,7 +136,7 @@ async def precache_data():
|
||||||
authors_by_id[author_id] = profile
|
authors_by_id[author_id] = profile
|
||||||
author_payload = json.dumps(profile, cls=CustomJSONEncoder)
|
author_payload = json.dumps(profile, cls=CustomJSONEncoder)
|
||||||
await redis.execute("SET", f"author:id:{author_id}", author_payload)
|
await redis.execute("SET", f"author:id:{author_id}", author_payload)
|
||||||
await redis.execute("SET", f"author:user:{user_id.strip()}", author_payload)
|
await redis.execute("SET", f"author:user:{user_id.strip()}", author_id)
|
||||||
else:
|
else:
|
||||||
logger.error(f"caching {author.dict()}")
|
logger.error(f"caching {author.dict()}")
|
||||||
logger.info(f"{len(authors)} authors precached")
|
logger.info(f"{len(authors)} authors precached")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user