@azteam/rabbitmq-async 1.0.170 → 1.0.171
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.
- package/lib/RabbitMQAsync.js +2 -2
- package/package.json +1 -1
- package/src/RabbitMQAsync.js +2 -2
package/lib/RabbitMQAsync.js
CHANGED
|
@@ -380,7 +380,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
|
|
|
380
380
|
_context6.next = 16;
|
|
381
381
|
break;
|
|
382
382
|
}
|
|
383
|
-
if (!
|
|
383
|
+
if (!messageQueue.worker) {
|
|
384
384
|
_context6.next = 12;
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
@@ -399,7 +399,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
|
|
|
399
399
|
break;
|
|
400
400
|
case 16:
|
|
401
401
|
_context6.next = 18;
|
|
402
|
-
return messageQueue.send(
|
|
402
|
+
return messageQueue.send('RETRY', {
|
|
403
403
|
queueName: queueName,
|
|
404
404
|
data: data,
|
|
405
405
|
retry_time: new Date()
|
package/package.json
CHANGED
package/src/RabbitMQAsync.js
CHANGED
|
@@ -157,7 +157,7 @@ class RabbitMQAsync {
|
|
|
157
157
|
if (msg.fields.redelivered) {
|
|
158
158
|
data.retry -= 1;
|
|
159
159
|
if (data.retry > 0) {
|
|
160
|
-
if (messageQueue.worker
|
|
160
|
+
if (messageQueue.worker) {
|
|
161
161
|
await messageQueue.send(queueName, {
|
|
162
162
|
...data,
|
|
163
163
|
self: true,
|
|
@@ -166,7 +166,7 @@ class RabbitMQAsync {
|
|
|
166
166
|
await messageQueue.send(queueName, data);
|
|
167
167
|
}
|
|
168
168
|
} else {
|
|
169
|
-
await messageQueue.send(
|
|
169
|
+
await messageQueue.send('RETRY', {
|
|
170
170
|
queueName,
|
|
171
171
|
data,
|
|
172
172
|
retry_time: new Date(),
|