summaryrefslogtreecommitdiff
path: root/packages/backend/src/core
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2024-01-24 13:53:55 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2024-01-24 13:53:55 +0900
commita97d4fa4ef9048a33009f7dd600d077a6e2fa240 (patch)
treed017c303602edb319f019c102ab825ed6052f606 /packages/backend/src/core
parentperf(reversi): set expire matchSpecific and matchAny (diff)
downloadsharkey-a97d4fa4ef9048a33009f7dd600d077a6e2fa240.tar.gz
sharkey-a97d4fa4ef9048a33009f7dd600d077a6e2fa240.tar.bz2
sharkey-a97d4fa4ef9048a33009f7dd600d077a6e2fa240.zip
fix(reversi): wait redis operation to improve stability
Diffstat (limited to 'packages/backend/src/core')
-rw-r--r--packages/backend/src/core/ReversiService.ts2
1 files changed, 1 insertions, 1 deletions
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),