From ff6d9d28604d173b57bdb26b94ccd16bd0f4c4ba Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 7 Apr 2023 11:20:14 +0900 Subject: feat(backend): イベント用Redisを別サーバーに分離できるように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/MetaService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/backend/src/core/MetaService.ts') diff --git a/packages/backend/src/core/MetaService.ts b/packages/backend/src/core/MetaService.ts index 4b792c083d..2b6160c82e 100644 --- a/packages/backend/src/core/MetaService.ts +++ b/packages/backend/src/core/MetaService.ts @@ -14,8 +14,8 @@ export class MetaService implements OnApplicationShutdown { private intervalId: NodeJS.Timer; constructor( - @Inject(DI.redisSubscriber) - private redisSubscriber: Redis.Redis, + @Inject(DI.redisForPubsub) + private redisForPubsub: Redis.Redis, @Inject(DI.db) private db: DataSource, @@ -33,7 +33,7 @@ export class MetaService implements OnApplicationShutdown { }, 1000 * 60 * 5); } - this.redisSubscriber.on('message', this.onMessage); + this.redisForPubsub.on('message', this.onMessage); } @bindThis @@ -122,6 +122,6 @@ export class MetaService implements OnApplicationShutdown { @bindThis public onApplicationShutdown(signal?: string | undefined) { clearInterval(this.intervalId); - this.redisSubscriber.off('message', this.onMessage); + this.redisForPubsub.off('message', this.onMessage); } } -- cgit v1.2.3-freya