refactor
This commit is contained in:
@@ -100,7 +100,7 @@ export class GlobalModule implements OnApplicationShutdown {
|
||||
@Inject(DI.redisForSub) private redisForSub: Redis.Redis,
|
||||
) {}
|
||||
|
||||
async onApplicationShutdown(signal: string): Promise<void> {
|
||||
public async dispose(): Promise<void> {
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
// XXX:
|
||||
// Shutting down the existing connections causes errors on Jest as
|
||||
@@ -116,4 +116,8 @@ export class GlobalModule implements OnApplicationShutdown {
|
||||
this.redisForSub.disconnect(),
|
||||
]);
|
||||
}
|
||||
|
||||
async onApplicationShutdown(signal: string): Promise<void> {
|
||||
await this.dispose();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user