@yolo-croket-dev/core 1.7.5-slowquery.3 → 1.7.5-slowquery.5

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.
@@ -160,7 +160,6 @@ let RPCInterceptor = class RPCInterceptor {
160
160
  // traceId,
161
161
  // method,
162
162
  // };
163
- console.log('reDeliveryCount: ', reDeliveryCount, 'staticRetryCount: ', staticRetryCount);
164
163
  /** consume 메시지 전부 cancel */
165
164
  if (this.gracefulShutdownService.isApplicationExit) {
166
165
  msaLogger.debug('RPCInterceptor isApplicationExit called', { traceId: 'IS_APPLICATION_EXIT' });
@@ -280,14 +279,9 @@ let RPCInterceptor = class RPCInterceptor {
280
279
  // eslint-disable-next-line consistent-return
281
280
  return next
282
281
  .handle()
283
- .pipe((0, operators_1.timeout)(1000 * 10), // 30분 타임아웃
284
- (0, operators_1.catchError)((err, caught) => {
285
- console.log('on catchError err: ', err.name, err.message);
286
- const channel = rmq.getChannelRef();
287
- const message = rmq.getMessage();
288
- channel.nack(message, false, false);
289
- return caught;
290
- }), (0, operators_1.tap)({
282
+ .pipe((0, operators_1.timeout)(1000 * 10),
283
+ // timeout(1000 * 60 * 30), // 30분 타임아웃
284
+ (0, operators_1.tap)({
291
285
  next: async (val) => {
292
286
  val.isError = false;
293
287
  // const duration = Date.now() - now;
@@ -308,6 +302,10 @@ let RPCInterceptor = class RPCInterceptor {
308
302
  error: localErrorProcessor,
309
303
  }), (0, operators_1.finalize)(() => {
310
304
  this.gracefulShutdownService.popActiveInterceptors(execInterceptor);
305
+ }), (0, operators_1.catchError)(async (err) => {
306
+ console.log('err: ', err.name, err.message);
307
+ channel.nack(message, false, true);
308
+ console.log('nack 호출 (retry)');
311
309
  }));
312
310
  }
313
311
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/core",
3
- "version": "1.7.5-slowquery.3",
3
+ "version": "1.7.5-slowquery.5",
4
4
  "author": "Yolo Co., Ltd.",
5
5
  "description": "Yolo commonization module",
6
6
  "main": "index.js",