refactor
This commit is contained in:
parent
fd7b77c542
commit
b6f21b6edb
16 changed files with 104 additions and 21 deletions
|
@ -100,7 +100,7 @@ export class QueueModule implements OnApplicationShutdown {
|
|||
@Inject('queue:webhookDeliver') public webhookDeliverQueue: WebhookDeliverQueue,
|
||||
) {}
|
||||
|
||||
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
|
||||
|
@ -120,4 +120,8 @@ export class QueueModule implements OnApplicationShutdown {
|
|||
this.webhookDeliverQueue.close(),
|
||||
]);
|
||||
}
|
||||
|
||||
async onApplicationShutdown(signal: string): Promise<void> {
|
||||
await this.dispose();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue