fix(backend): イベント用redis分離が上手く動かない問題を修正
This commit is contained in:
parent
b56f4b27ee
commit
39cf80e19f
9 changed files with 53 additions and 34 deletions
|
@ -27,8 +27,8 @@ export class AntennaService implements OnApplicationShutdown {
|
|||
@Inject(DI.redis)
|
||||
private redisClient: Redis.Redis,
|
||||
|
||||
@Inject(DI.redisForPubsub)
|
||||
private redisForPubsub: Redis.Redis,
|
||||
@Inject(DI.redisForSub)
|
||||
private redisForSub: Redis.Redis,
|
||||
|
||||
@Inject(DI.mutingsRepository)
|
||||
private mutingsRepository: MutingsRepository,
|
||||
|
@ -52,12 +52,12 @@ export class AntennaService implements OnApplicationShutdown {
|
|||
this.antennasFetched = false;
|
||||
this.antennas = [];
|
||||
|
||||
this.redisForPubsub.on('message', this.onRedisMessage);
|
||||
this.redisForSub.on('message', this.onRedisMessage);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public onApplicationShutdown(signal?: string | undefined) {
|
||||
this.redisForPubsub.off('message', this.onRedisMessage);
|
||||
this.redisForSub.off('message', this.onRedisMessage);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue