@yolo-croket-dev/core 1.4.53-slowquery.5 → 1.4.53-slowquery.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,6 +13,7 @@ let GracefulShutdownModule = class GracefulShutdownModule {
|
|
|
13
13
|
};
|
|
14
14
|
exports.GracefulShutdownModule = GracefulShutdownModule;
|
|
15
15
|
exports.GracefulShutdownModule = GracefulShutdownModule = __decorate([
|
|
16
|
+
(0, common_1.Global)(),
|
|
16
17
|
(0, common_1.Module)({
|
|
17
18
|
providers: [graceful_shutdown_service_1.GracefulShutdownService],
|
|
18
19
|
exports: [graceful_shutdown_service_1.GracefulShutdownService],
|
|
@@ -51,17 +51,8 @@ let GracefulShutdownService = class GracefulShutdownService {
|
|
|
51
51
|
msaLogger.debug(`GracefulShutdownService.decActiveInterceptors: ${this.activeInterceptors}`, { traceId: 'DEC_ACTIVE_INTERCEPTORS' });
|
|
52
52
|
}
|
|
53
53
|
async onApplicationShutdown(signal) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
// eslint-disable-next-line max-len
|
|
57
|
-
msaLogger.debug(`GracefulShutdownService.onApplicationShutdown: activeInterceptors=${this.activeInterceptors}`, { traceId: 'ON_APPLICATION_SHUTDOWN' });
|
|
58
|
-
while (this.activeInterceptors > 0) {
|
|
59
|
-
// eslint-disable-next-line max-len
|
|
60
|
-
msaLogger.debug(`GracefulShutdownService.onApplicationShutdown: waiting for ${this.activeInterceptors} interceptors to finish`, { traceId: 'ON_APPLICATION_SHUTDOWN' });
|
|
61
|
-
await new Promise((resolve) => {
|
|
62
|
-
setTimeout(resolve, 100);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
54
|
+
msaLogger.debug(`GracefulShutdownService.onApplicationShutdown signal=${signal}`, { traceId: 'ON_APPLICATION_SHUTDOWN' });
|
|
55
|
+
process.exit(0);
|
|
65
56
|
}
|
|
66
57
|
async onModuleDestroy() {
|
|
67
58
|
this.isApplicationExit = true;
|
|
@@ -71,7 +62,7 @@ let GracefulShutdownService = class GracefulShutdownService {
|
|
|
71
62
|
// eslint-disable-next-line max-len
|
|
72
63
|
msaLogger.debug(`GracefulShutdownService.onModuleDestroy: waiting for ${this.activeInterceptors} interceptors to finish`, { traceId: 'ON_MODULE_DESTROY' });
|
|
73
64
|
await new Promise((resolve) => {
|
|
74
|
-
setTimeout(resolve,
|
|
65
|
+
setTimeout(resolve, 1000);
|
|
75
66
|
});
|
|
76
67
|
}
|
|
77
68
|
}
|