race-fix4

This commit is contained in:
2023-10-13 03:08:59 +03:00
parent 7b4524232b
commit 00d2066564
2 changed files with 4 additions and 4 deletions

View File

@@ -56,11 +56,11 @@ async def load_chats(_, info, limit: int = 50, offset: int = 0):
for cid in cids:
# Start a pipeline
pipeline = redis.pipeline()
pipeline = await redis.pipeline()
# Add the GET command to the pipeline
pipeline.get(f"chats/{cid}")
# Execute the pipeline
result = pipeline.execute()
result = await pipeline.execute()
# Get the result of the GET command
c = result[0]
print(f"got chat {c}")