From a97d4fa4ef9048a33009f7dd600d077a6e2fa240 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 24 Jan 2024 13:53:55 +0900 Subject: [PATCH] fix(reversi): wait redis operation to improve stability --- packages/backend/src/core/ReversiService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/ReversiService.ts b/packages/backend/src/core/ReversiService.ts index 699b312949..1d2c168f59 100644 --- a/packages/backend/src/core/ReversiService.ts +++ b/packages/backend/src/core/ReversiService.ts @@ -128,7 +128,7 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit { const redisPipeline = this.redisClient.pipeline(); redisPipeline.zadd(`reversi:matchSpecific:${targetUser.id}`, Date.now(), me.id); redisPipeline.expire(`reversi:matchSpecific:${targetUser.id}`, 120, 'NX'); - redisPipeline.exec(); + await redisPipeline.exec(); this.globalEventService.publishReversiStream(targetUser.id, 'invited', { user: await this.userEntityService.pack(me, targetUser),