summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/QueueModule.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-05-29 13:21:26 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-05-29 13:21:26 +0900
commitb6f21b6edb95882d1616c36ed7eeb1f78809e2f6 (patch)
tree958180462a10904c7ec16778d2a2adf7dd60fa93 /packages/backend/src/core/QueueModule.ts
parentenhance(backend): migrate bull to bullmq (#10910) (diff)
downloadsharkey-b6f21b6edb95882d1616c36ed7eeb1f78809e2f6.tar.gz
sharkey-b6f21b6edb95882d1616c36ed7eeb1f78809e2f6.tar.bz2
sharkey-b6f21b6edb95882d1616c36ed7eeb1f78809e2f6.zip
refactor
Diffstat (limited to 'packages/backend/src/core/QueueModule.ts')
-rw-r--r--packages/backend/src/core/QueueModule.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/backend/src/core/QueueModule.ts b/packages/backend/src/core/QueueModule.ts
index 6db9bb14cf..3384ca4577 100644
--- a/packages/backend/src/core/QueueModule.ts
+++ b/packages/backend/src/core/QueueModule.ts
@@ -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();
+ }
}