diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-04-07 11:20:14 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-04-07 11:20:14 +0900 |
| commit | ff6d9d28604d173b57bdb26b94ccd16bd0f4c4ba (patch) | |
| tree | 7d608de794ce10af14f954d753ce2d86501ca5c7 /packages/backend/src/core/WebhookService.ts | |
| parent | perf(backend): reduce db query (diff) | |
| download | sharkey-ff6d9d28604d173b57bdb26b94ccd16bd0f4c4ba.tar.gz sharkey-ff6d9d28604d173b57bdb26b94ccd16bd0f4c4ba.tar.bz2 sharkey-ff6d9d28604d173b57bdb26b94ccd16bd0f4c4ba.zip | |
feat(backend): イベント用Redisを別サーバーに分離できるように
Diffstat (limited to 'packages/backend/src/core/WebhookService.ts')
| -rw-r--r-- | packages/backend/src/core/WebhookService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/WebhookService.ts b/packages/backend/src/core/WebhookService.ts index ac1e413de6..85594f8557 100644 --- a/packages/backend/src/core/WebhookService.ts +++ b/packages/backend/src/core/WebhookService.ts @@ -13,14 +13,14 @@ export class WebhookService implements OnApplicationShutdown { private webhooks: Webhook[] = []; constructor( - @Inject(DI.redisSubscriber) - private redisSubscriber: Redis.Redis, + @Inject(DI.redisForPubsub) + private redisForPubsub: Redis.Redis, @Inject(DI.webhooksRepository) private webhooksRepository: WebhooksRepository, ) { //this.onMessage = this.onMessage.bind(this); - this.redisSubscriber.on('message', this.onMessage); + this.redisForPubsub.on('message', this.onMessage); } @bindThis @@ -82,6 +82,6 @@ export class WebhookService implements OnApplicationShutdown { @bindThis public onApplicationShutdown(signal?: string | undefined) { - this.redisSubscriber.off('message', this.onMessage); + this.redisForPubsub.off('message', this.onMessage); } } |