@autofleet/rabbit 2.5.2 → 2.5.4
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/dist/index.js +7 -1
- package/package.json +1 -1
- package/src/index.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const outbreak_1 = require("@autofleet/outbreak");
|
|
|
14
14
|
const logger_1 = __importDefault(require("./logger"));
|
|
15
15
|
const rabbitError_1 = __importDefault(require("./rabbitError"));
|
|
16
16
|
const redis_1 = __importDefault(require("./redis"));
|
|
17
|
-
const DEFAULT_DEAD_TTL_TWO_DAYS = 60000 * 60 *
|
|
17
|
+
const DEFAULT_DEAD_TTL_TWO_DAYS = 60000 * 60 * 12;
|
|
18
18
|
const DEFAULT_LOCK_TIMEOUT = 1000 * 5;
|
|
19
19
|
const RETRY_HEADER = 'x-retry-count';
|
|
20
20
|
const TRACING_HEADER = 'x-trace-id';
|
|
@@ -93,6 +93,12 @@ class RabbitMq {
|
|
|
93
93
|
}
|
|
94
94
|
await channel.ack(msg);
|
|
95
95
|
}
|
|
96
|
+
else {
|
|
97
|
+
logger_1.default.error('no channel or msg', {
|
|
98
|
+
channel: channel ? channel.name : '',
|
|
99
|
+
msg,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
96
102
|
};
|
|
97
103
|
this.em = new events_1.EventEmitter();
|
|
98
104
|
this.channel = null;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -52,7 +52,7 @@ export interface AfRabbitOptions {
|
|
|
52
52
|
disableReconnect: boolean;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const DEFAULT_DEAD_TTL_TWO_DAYS = 60000 * 60 *
|
|
55
|
+
const DEFAULT_DEAD_TTL_TWO_DAYS = 60000 * 60 * 12;
|
|
56
56
|
const DEFAULT_LOCK_TIMEOUT = 1000 * 5;
|
|
57
57
|
const RETRY_HEADER = 'x-retry-count';
|
|
58
58
|
const TRACING_HEADER = 'x-trace-id';
|
|
@@ -231,6 +231,11 @@ class RabbitMq implements IAfRabbitMq {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
await channel.ack(msg);
|
|
234
|
+
} else {
|
|
235
|
+
logger.error('no channel or msg', {
|
|
236
|
+
channel: channel ? channel.name : '',
|
|
237
|
+
msg,
|
|
238
|
+
});
|
|
234
239
|
}
|
|
235
240
|
}
|
|
236
241
|
|