@yolo-croket-dev/core 1.7.37 → 1.7.38-slowquery.0
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.
|
@@ -8,7 +8,7 @@ class AbortContext {
|
|
|
8
8
|
const newContext = {
|
|
9
9
|
abortSignal,
|
|
10
10
|
// eslint-disable-next-line no-plusplus
|
|
11
|
-
requestId: `ctx_${++this.contextCounter}_${Date.now()}`,
|
|
11
|
+
requestId: `ctx_${requestId}_${++this.contextCounter}_${Date.now()}`,
|
|
12
12
|
createdAt: Date.now(),
|
|
13
13
|
parentContext: currentContext || undefined,
|
|
14
14
|
};
|
|
@@ -33,14 +33,16 @@ class AbortContext {
|
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
35
|
// 컨텍스트 종료
|
|
36
|
+
// eslint-disable-next-line consistent-return
|
|
36
37
|
static endContext(context) {
|
|
37
38
|
const selectContext = context || this.asyncLocalStorage.getStore();
|
|
38
39
|
if (selectContext) {
|
|
40
|
+
selectContext.abortSignal.removeEventListener('abort', () => { });
|
|
41
|
+
this.asyncLocalStorage.disable();
|
|
39
42
|
// parent context가 있으면 전부 종료
|
|
40
43
|
if (selectContext.parentContext) {
|
|
41
|
-
this.endContext(selectContext.parentContext);
|
|
44
|
+
return this.endContext(selectContext.parentContext);
|
|
42
45
|
}
|
|
43
|
-
this.asyncLocalStorage.disable();
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
/**
|