Skip to content

Commit

Permalink
fix(reversi): wait redis operation to improve stability
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Jan 24, 2024
1 parent 908e0f3 commit a97d4fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/core/ReversiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a97d4fa

Please sign in to comment.