@azteam/rabbitmq-async 1.0.214 → 1.0.216

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.
@@ -353,7 +353,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
353
353
  break;
354
354
  case 11:
355
355
  _context7.next = 13;
356
- return messageQueue.send(messageQueue.parsePrefix(this.retryKey), {
356
+ return messageQueue.send(messageQueue.parsePrefix(messageQueue.retryKey), {
357
357
  queueName: queueName,
358
358
  data: data,
359
359
  retry_time: new Date(),
@@ -420,7 +420,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
420
420
  case "end":
421
421
  return _context7.stop();
422
422
  }
423
- }, _callee7, this, [[3, 41], [17, 24]]);
423
+ }, _callee7, null, [[3, 41], [17, 24]]);
424
424
  }));
425
425
  return function (_x5) {
426
426
  return _ref2.apply(this, arguments);
@@ -428,7 +428,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
428
428
  }());
429
429
  });
430
430
  case 10:
431
- _context8.next = 17;
431
+ _context8.next = 18;
432
432
  break;
433
433
  case 12:
434
434
  _context8.prev = 12;
@@ -436,8 +436,9 @@ var RabbitMQAsync = /*#__PURE__*/function () {
436
436
  _context8.next = 16;
437
437
  return (0, _util.timeout)(5000);
438
438
  case 16:
439
+ this._alert('error', _context8.t0);
439
440
  return _context8.abrupt("return", this.consume(queueName, asyncFunction, callbackError));
440
- case 17:
441
+ case 18:
441
442
  case "end":
442
443
  return _context8.stop();
443
444
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/rabbitmq-async",
3
- "version": "1.0.214",
3
+ "version": "1.0.216",
4
4
  "description": "N/A",
5
5
  "keywords": [
6
6
  "toda",
@@ -16,7 +16,7 @@
16
16
  "prepublishOnly": "babel src --delete-dir-on-start -d lib"
17
17
  },
18
18
  "dependencies": {
19
- "@azteam/util": "1.0.54",
19
+ "@azteam/util": "1.0.55",
20
20
  "amqplib": "0.8.0",
21
21
  "fs-extra": "10.1.0",
22
22
  "lodash": "4.17.21"
@@ -133,7 +133,6 @@ class RabbitMQAsync {
133
133
  channel.consume(prefixQueueName, async function (msg) {
134
134
  if (msg) {
135
135
  const data = JSON.parse(msg.content.toString());
136
-
137
136
  if (data) {
138
137
  try {
139
138
  if (msg.fields.redelivered) {
@@ -141,7 +140,7 @@ class RabbitMQAsync {
141
140
  if (data.retry > 0) {
142
141
  await messageQueue.send(queueName, data);
143
142
  } else {
144
- await messageQueue.send(messageQueue.parsePrefix(this.retryKey), {
143
+ await messageQueue.send(messageQueue.parsePrefix(messageQueue.retryKey), {
145
144
  queueName,
146
145
  data,
147
146
  retry_time: new Date(),
@@ -182,6 +181,7 @@ class RabbitMQAsync {
182
181
  }
183
182
  } catch (err3) {
184
183
  await timeout(5000);
184
+ this._alert('error', err3);
185
185
  return this.consume(queueName, asyncFunction, callbackError);
186
186
  }
187
187
  }