@yolo-croket-dev/core 1.7.38-slowquery.5 → 1.7.38-slowquery.7
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.
|
@@ -32,24 +32,23 @@ class AbortContext {
|
|
|
32
32
|
}
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
+
static disable() {
|
|
36
|
+
this.asyncLocalStorage.disable();
|
|
37
|
+
}
|
|
35
38
|
// 컨텍스트 종료
|
|
36
39
|
// eslint-disable-next-line consistent-return
|
|
37
40
|
static endContext(context) {
|
|
38
41
|
const selectContext = context || this.asyncLocalStorage.getStore();
|
|
39
|
-
console.log('selectContext', selectContext);
|
|
40
42
|
if (selectContext) {
|
|
41
43
|
if (selectContext.abortHandler) {
|
|
42
|
-
console.log('selectContext.abortHandler', selectContext.abortHandler);
|
|
43
44
|
selectContext.abortSignal.removeEventListener('abort', selectContext.abortHandler || (() => { }));
|
|
44
45
|
}
|
|
45
46
|
if (selectContext.timerId) {
|
|
46
|
-
console.log('selectContext.timerId', selectContext.timerId);
|
|
47
47
|
clearTimeout(selectContext.timerId);
|
|
48
48
|
}
|
|
49
49
|
this.asyncLocalStorage.disable();
|
|
50
50
|
// parent context가 있으면 전부 종료
|
|
51
51
|
if (selectContext.parentContext) {
|
|
52
|
-
console.log('selectContext.parentContext', selectContext.parentContext);
|
|
53
52
|
return this.endContext(selectContext.parentContext);
|
|
54
53
|
}
|
|
55
54
|
}
|
|
@@ -58,7 +57,6 @@ class AbortContext {
|
|
|
58
57
|
static updateContext(updatedData) {
|
|
59
58
|
const currentContext = this.asyncLocalStorage.getStore();
|
|
60
59
|
if (!currentContext) {
|
|
61
|
-
console.log('currentContext not found');
|
|
62
60
|
return;
|
|
63
61
|
}
|
|
64
62
|
// 업데이트할 데이터만 갱신
|
|
@@ -67,7 +65,6 @@ class AbortContext {
|
|
|
67
65
|
...updatedData,
|
|
68
66
|
updatedAt: Date.now(), // `updatedAt` 값을 갱신
|
|
69
67
|
};
|
|
70
|
-
console.log('currentContext update!', currentContext, updatedContext);
|
|
71
68
|
// 업데이트된 컨텍스트를 다시 저장
|
|
72
69
|
this.asyncLocalStorage.enterWith(updatedContext);
|
|
73
70
|
}
|
|
@@ -329,7 +329,7 @@ let RPCInterceptor = RPCInterceptor_1 = class RPCInterceptor {
|
|
|
329
329
|
}
|
|
330
330
|
this.gracefulShutdownService.pushActiveInterceptors(execInterceptor);
|
|
331
331
|
// eslint-disable-next-line consistent-return
|
|
332
|
-
return functions_1.AbortContext.run(abortController.signal, execInterceptor.traceId, (
|
|
332
|
+
return functions_1.AbortContext.run(abortController.signal, execInterceptor.traceId, () => next
|
|
333
333
|
.handle()
|
|
334
334
|
.pipe((0, operators_1.timeout)({
|
|
335
335
|
each: this.DEFAULT_TIMEOUT,
|
|
@@ -361,10 +361,9 @@ let RPCInterceptor = RPCInterceptor_1 = class RPCInterceptor {
|
|
|
361
361
|
error: localErrorProcessor,
|
|
362
362
|
}), (0, operators_1.finalize)(() => {
|
|
363
363
|
this.gracefulShutdownService.popActiveInterceptors(execInterceptor);
|
|
364
|
-
|
|
365
|
-
functions_1.AbortContext.endContext(context);
|
|
364
|
+
functions_1.AbortContext.disable();
|
|
366
365
|
abortController = null;
|
|
367
|
-
return
|
|
366
|
+
return rxjs_1.EMPTY;
|
|
368
367
|
})));
|
|
369
368
|
}
|
|
370
369
|
};
|