followers-cached
Some checks failed
Deploy on push / deploy (push) Failing after 5s

This commit is contained in:
2024-02-29 10:23:08 +03:00
parent caf45f3d42
commit f774c54cc2
2 changed files with 8 additions and 1 deletions

View File

@@ -25,6 +25,11 @@ async def update_author_cache(author: dict, ttl=25 * 60 * 60):
await redis.execute('SETEX', f'id:{author.get("id")}:author', ttl, payload)
async def update_author_followers_cache(author_id: int, followers, ttl=25 * 60 * 60):
payload = json.dumps(followers)
await redis.execute('SET', f'author:{author_id}:followers', payload)
async def update_follows_topics_cache(follows, author_id: int, ttl=25 * 60 * 60):
try:
payload = json.dumps(follows)