redis-set-result-fix

This commit is contained in:
Untone 2023-10-13 12:42:42 +03:00
parent a148e1b1ab
commit 723a0a2818

View File

@ -49,7 +49,7 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0):
cids = (await redis.execute("SMEMBERS", f"chats_by_author/{author_id}")) or [] cids = (await redis.execute("SMEMBERS", f"chats_by_author/{author_id}")) or []
members_online = (await redis.execute("SMEMBERS", "authors-online")) or [] members_online = (await redis.execute("SMEMBERS", "authors-online")) or []
await redis.execute('EXEC') await redis.execute('EXEC')
cids = cids[offset:(offset + limit)] cids = list(cids)[offset:(offset + limit)]
chats = [] chats = []
lock = asyncio.Lock() lock = asyncio.Lock()
if len(cids) == 0: if len(cids) == 0: