@autofleet/rabbit 2.2.0-beta-1 → 2.2.0

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 CHANGED
@@ -218,7 +218,7 @@ class RabbitMq {
218
218
  if (!this.redisLock) {
219
219
  throw new Error('Usage of consumeWithLock requires RedisInstance');
220
220
  }
221
- const lockTimeout = options && options.lockTimeout ? options.lockTimeout : DEFAULT_LOCK_TIMEOUT;
221
+ const lockTimeout = (options === null || options === void 0 ? void 0 : options.lockTimeout) || DEFAULT_LOCK_TIMEOUT;
222
222
  logger_1.default.info(`Consuming with lock from queue ${queue} with lockTimeout: ${lockTimeout}ms`);
223
223
  return this.consumeFromRabbit(queue, (msg, ack, nack) => __awaiter(this, void 0, void 0, function* () {
224
224
  if (!msg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/rabbit",
3
- "version": "2.2.0-beta-1",
3
+ "version": "2.2.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -286,7 +286,7 @@ class RabbitMq implements IAfRabbitMq {
286
286
  if (!this.redisLock) {
287
287
  throw new Error('Usage of consumeWithLock requires RedisInstance');
288
288
  }
289
- const lockTimeout = options && options.lockTimeout ? options.lockTimeout : DEFAULT_LOCK_TIMEOUT;
289
+ const lockTimeout = options?.lockTimeout || DEFAULT_LOCK_TIMEOUT;
290
290
  logger.info(`Consuming with lock from queue ${queue} with lockTimeout: ${lockTimeout}ms`);
291
291
  return this.consumeFromRabbit(queue, async (msg, ack, nack) => {
292
292
  if (!msg) {
package/.env DELETED
File without changes
package/dump.rdb DELETED
Binary file