summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/chart
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/chart
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/chart')
-rw-r--r--packages/backend/src/core/chart/ChartManagementService.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/backend/src/core/chart/ChartManagementService.ts b/packages/backend/src/core/chart/ChartManagementService.ts
index 03e3612658..b0e9e534df 100644
--- a/packages/backend/src/core/chart/ChartManagementService.ts
+++ b/packages/backend/src/core/chart/ChartManagementService.ts
@@ -60,7 +60,8 @@ export class ChartManagementService implements OnApplicationShutdown {
}, 1000 * 60 * 20);
}
- async onApplicationShutdown(signal: string): Promise<void> {
+ @bindThis
+ public async dispose(): Promise<void> {
clearInterval(this.saveIntervalId);
if (process.env.NODE_ENV !== 'test') {
await Promise.all(
@@ -68,4 +69,9 @@ export class ChartManagementService implements OnApplicationShutdown {
);
}
}
+
+ @bindThis
+ async onApplicationShutdown(signal: string): Promise<void> {
+ await this.dispose();
+ }
}