race-fix4
This commit is contained in:
@@ -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}")
|
||||
|
Reference in New Issue
Block a user