fix(reversi): wait redis operation to improve stability
This commit is contained in:
parent
908e0f3b8b
commit
a97d4fa4ef
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue