mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 17:03:09 +02:00
fix(reversi): wait redis operation to improve stability
This commit is contained in:
parent
908e0f3b8b
commit
a97d4fa4ef
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
||||||
const redisPipeline = this.redisClient.pipeline();
|
const redisPipeline = this.redisClient.pipeline();
|
||||||
redisPipeline.zadd(`reversi:matchSpecific:${targetUser.id}`, Date.now(), me.id);
|
redisPipeline.zadd(`reversi:matchSpecific:${targetUser.id}`, Date.now(), me.id);
|
||||||
redisPipeline.expire(`reversi:matchSpecific:${targetUser.id}`, 120, 'NX');
|
redisPipeline.expire(`reversi:matchSpecific:${targetUser.id}`, 120, 'NX');
|
||||||
redisPipeline.exec();
|
await redisPipeline.exec();
|
||||||
|
|
||||||
this.globalEventService.publishReversiStream(targetUser.id, 'invited', {
|
this.globalEventService.publishReversiStream(targetUser.id, 'invited', {
|
||||||
user: await this.userEntityService.pack(me, targetUser),
|
user: await this.userEntityService.pack(me, targetUser),
|
||||||
|
|
Loading…
Reference in a new issue