diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2024-01-24 13:53:55 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2024-01-24 13:53:55 +0900 |
| commit | a97d4fa4ef9048a33009f7dd600d077a6e2fa240 (patch) | |
| tree | d017c303602edb319f019c102ab825ed6052f606 /packages/backend/src/core/ReversiService.ts | |
| parent | perf(reversi): set expire matchSpecific and matchAny (diff) | |
| download | sharkey-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/ReversiService.ts')
| -rw-r--r-- | packages/backend/src/core/ReversiService.ts | 2 |
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), |