@azteam/rabbitmq-async 1.0.171 → 1.0.172

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.
@@ -163,14 +163,14 @@ var RabbitMQAsync = /*#__PURE__*/function () {
163
163
  key: "parsePrefix",
164
164
  value: function parsePrefix(name) {
165
165
  var self = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
166
+ var newName = name;
166
167
  if (self) {
167
- // eslint-disable-next-line no-param-reassign
168
- name = "".concat(this.serverIp, "_").concat(name);
168
+ newName = "".concat(this.serverIp, "_").concat(newName);
169
169
  }
170
170
  if (this.prefix) {
171
- return "".concat(this.prefix, ":").concat(name);
171
+ newName = "".concat(this.prefix, ":").concat(newName);
172
172
  }
173
- return name;
173
+ return newName;
174
174
  }
175
175
  }, {
176
176
  key: "send",
@@ -399,7 +399,7 @@ var RabbitMQAsync = /*#__PURE__*/function () {
399
399
  break;
400
400
  case 16:
401
401
  _context6.next = 18;
402
- return messageQueue.send('RETRY', {
402
+ return messageQueue.send(messageQueue.parsePrefix('RETRY'), {
403
403
  queueName: queueName,
404
404
  data: data,
405
405
  retry_time: new Date()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/rabbitmq-async",
3
- "version": "1.0.171",
3
+ "version": "1.0.172",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "toda",
@@ -66,15 +66,14 @@ class RabbitMQAsync {
66
66
  }
67
67
 
68
68
  parsePrefix(name, self = false) {
69
+ let newName = name;
69
70
  if (self) {
70
- // eslint-disable-next-line no-param-reassign
71
- name = `${this.serverIp}_${name}`;
71
+ newName = `${this.serverIp}_${newName}`;
72
72
  }
73
-
74
73
  if (this.prefix) {
75
- return `${this.prefix}:${name}`;
74
+ newName = `${this.prefix}:${newName}`;
76
75
  }
77
- return name;
76
+ return newName;
78
77
  }
79
78
 
80
79
  async send(queueName, msg = {}, limit = 0) {
@@ -166,7 +165,7 @@ class RabbitMQAsync {
166
165
  await messageQueue.send(queueName, data);
167
166
  }
168
167
  } else {
169
- await messageQueue.send('RETRY', {
168
+ await messageQueue.send(messageQueue.parsePrefix('RETRY'), {
170
169
  queueName,
171
170
  data,
172
171
  retry_time: new Date(),