fix(reversi): wait redis operation to improve stability

This commit is contained in:
syuilo 2024-01-24 13:53:55 +09:00
parent 908e0f3b8b
commit a97d4fa4ef
1 changed files with 1 additions and 1 deletions

View File

@ -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),