@yolo-croket-dev/core 1.7.25-slowquery.24 → 1.7.25-slowquery.25

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.
@@ -170,6 +170,19 @@ let RPCInterceptor = class RPCInterceptor {
170
170
  isMessageAck: false,
171
171
  };
172
172
  const abortController = new AbortController();
173
+ // eslint-disable-next-line no-undef
174
+ let abortCheckInterval = null;
175
+ abortCheckInterval = setInterval(() => {
176
+ try {
177
+ (0, functions_1.throwIfAborted)();
178
+ }
179
+ catch (err) {
180
+ if (abortCheckInterval) {
181
+ clearInterval(abortCheckInterval);
182
+ }
183
+ throw err;
184
+ }
185
+ }, 1000);
173
186
  /** consume 메시지 전부 cancel */
174
187
  if (this.gracefulShutdownService.isApplicationExit) {
175
188
  msaLogger.debug('RPCInterceptor isApplicationExit called', { traceId: 'IS_APPLICATION_EXIT' });
@@ -316,6 +329,9 @@ let RPCInterceptor = class RPCInterceptor {
316
329
  return (0, rxjs_1.throwError)(() => error);
317
330
  }), (0, operators_1.tap)({
318
331
  next: async (val) => {
332
+ if (abortCheckInterval) {
333
+ clearInterval(abortCheckInterval);
334
+ }
319
335
  val.isError = false;
320
336
  // const duration = Date.now() - now;
321
337
  // logger.debug(`<= (success:${traceId}): ${val.message}`, {
@@ -338,6 +354,9 @@ let RPCInterceptor = class RPCInterceptor {
338
354
  }),
339
355
  // eslint-disable-next-line consistent-return
340
356
  (0, operators_1.catchError)(async (err) => {
357
+ if (abortCheckInterval) {
358
+ clearInterval(abortCheckInterval);
359
+ }
341
360
  // timeout 에러 처리
342
361
  console.log('RPCInterceptor catchError 발생', err);
343
362
  const isTimeoutError = err instanceof Error && (err.name === 'TimeoutError' || err.message === this.DEFAULT_TIMEOUT_MESSAGE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/core",
3
- "version": "1.7.25-slowquery.24",
3
+ "version": "1.7.25-slowquery.25",
4
4
  "author": "Yolo Co., Ltd.",
5
5
  "description": "Yolo commonization module",
6
6
  "main": "index.js",