@yolo-croket-dev/core 1.7.25-slowquery.20 → 1.7.25-slowquery.21
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.
|
@@ -5,7 +5,7 @@ import { GracefulShutdownService } from '../modules/graceful-shutdown/graceful-s
|
|
|
5
5
|
export declare class RPCInterceptor implements NestInterceptor {
|
|
6
6
|
private readonly reflector;
|
|
7
7
|
private readonly gracefulShutdownService;
|
|
8
|
-
protected readonly DEFAULT_TIMEOUT
|
|
8
|
+
protected readonly DEFAULT_TIMEOUT = 1000;
|
|
9
9
|
protected readonly DEFAULT_TIMEOUT_MESSAGE = "\uC694\uCCAD\uC774 \uD0C0\uC784\uC544\uC6C3\uB418\uC5C8\uC2B5\uB2C8\uB2E4.";
|
|
10
10
|
constructor(reflector: Reflector, gracefulShutdownService: GracefulShutdownService);
|
|
11
11
|
private maxLengthOverShorten;
|
|
@@ -54,7 +54,8 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
54
54
|
constructor(reflector, gracefulShutdownService) {
|
|
55
55
|
this.reflector = reflector;
|
|
56
56
|
this.gracefulShutdownService = gracefulShutdownService;
|
|
57
|
-
this.DEFAULT_TIMEOUT = 1000
|
|
57
|
+
this.DEFAULT_TIMEOUT = 1000; // 29분 타임아웃
|
|
58
|
+
// protected readonly DEFAULT_TIMEOUT = 1000 * 60 * 29; // 29분 타임아웃
|
|
58
59
|
this.DEFAULT_TIMEOUT_MESSAGE = '요청이 타임아웃되었습니다.';
|
|
59
60
|
}
|
|
60
61
|
maxLengthOverShorten(data) {
|
|
@@ -296,9 +297,10 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
296
297
|
.pipe((0, operators_1.timeout)({
|
|
297
298
|
each: this.DEFAULT_TIMEOUT,
|
|
298
299
|
with: () => {
|
|
300
|
+
console.log('RPCInterceptor timeout 발생');
|
|
299
301
|
msaLogger.error('RPCInterceptor timeout 발생', { traceId: execInterceptor.traceId }, { message: this.DEFAULT_TIMEOUT_MESSAGE });
|
|
300
302
|
abortController.abort();
|
|
301
|
-
|
|
303
|
+
return (0, rxjs_1.throwError)(() => new Error(this.DEFAULT_TIMEOUT_MESSAGE));
|
|
302
304
|
},
|
|
303
305
|
}), (0, operators_1.tap)({
|
|
304
306
|
next: async (val) => {
|
|
@@ -325,6 +327,7 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
325
327
|
// eslint-disable-next-line consistent-return
|
|
326
328
|
(0, operators_1.catchError)(async (err) => {
|
|
327
329
|
// timeout 에러 처리
|
|
330
|
+
console.log('RPCInterceptor catchError 발생', err);
|
|
328
331
|
const isTimeoutError = err instanceof Error && (err.name === 'TimeoutError' || err.message === this.DEFAULT_TIMEOUT_MESSAGE);
|
|
329
332
|
if (isTimeoutError) {
|
|
330
333
|
msaLogger.error('[타임 아웃] 메시지 재전송 처리', { traceId: execInterceptor.traceId }, {
|