@autofleet/rabbit 2.4.0 → 2.4.2

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
@@ -9,7 +9,6 @@ const moment_1 = __importDefault(require("moment"));
9
9
  const redis_lock_1 = __importDefault(require("redis-lock"));
10
10
  const amqp_connection_manager_1 = require("amqp-connection-manager");
11
11
  const events_1 = require("events");
12
- // import { newTrace, traceTypes } from '@autofleet/outbreak';
13
12
  const util_1 = require("util");
14
13
  const logger_1 = __importDefault(require("./logger"));
15
14
  const rabbitError_1 = __importDefault(require("./rabbitError"));
@@ -145,7 +144,7 @@ class RabbitMq {
145
144
  const username = process.env.RABBITMQ_USERNAME || 'guest';
146
145
  const password = process.env.RABBITMQ_PASSWORD || 'guest';
147
146
  const host = process.env.RABBITMQ_SERVICE_HOST || '';
148
- const connection = await amqp_connection_manager_1.connect([`amqp://${username}:${password}@${host}`]);
147
+ const connection = await amqp_connection_manager_1.connect([`amqp://${username}:${password}@${host}?heartbeat=60`]);
149
148
  this.connection = connection;
150
149
  this.connection.on('disconnect', ({ err }) => {
151
150
  this.exchanges = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/rabbit",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -27,7 +27,6 @@
27
27
  "uuid": "^8.3.2"
28
28
  },
29
29
  "devDependencies": {
30
- "@autofleet/outbreak": "*",
31
30
  "@types/jest": "^26.0.23",
32
31
  "@typescript-eslint/eslint-plugin": "^4.8.1",
33
32
  "eslint": "^7.13.0",
@@ -39,8 +38,5 @@
39
38
  "typescript": "^3.8.3"
40
39
  },
41
40
  "author": "",
42
- "license": "ISC",
43
- "peerDependencies": {
44
- "@autofleet/outbreak": "^0.1.1"
45
- }
41
+ "license": "ISC"
46
42
  }
package/src/index.ts CHANGED
@@ -5,7 +5,6 @@ import RedisLock from 'redis-lock';
5
5
  import { ConfirmChannel, Options, ConsumeMessage } from 'amqplib';
6
6
  import { AmqpConnectionManager, ChannelWrapper, connect } from 'amqp-connection-manager';
7
7
  import { EventEmitter } from 'events';
8
- // import { newTrace, traceTypes } from '@autofleet/outbreak';
9
8
  import { promisify } from 'util';
10
9
  import logger from './logger';
11
10
  import RabbitError from './rabbitError';
@@ -234,7 +233,7 @@ class RabbitMq implements IAfRabbitMq {
234
233
  const username: string = process.env.RABBITMQ_USERNAME || 'guest';
235
234
  const password: string = process.env.RABBITMQ_PASSWORD || 'guest';
236
235
  const host: string = process.env.RABBITMQ_SERVICE_HOST || '';
237
- const connection: AmqpConnectionManager = await connect([`amqp://${username}:${password}@${host}`]);
236
+ const connection: AmqpConnectionManager = await connect([`amqp://${username}:${password}@${host}?heartbeat=60`]);
238
237
  this.connection = connection;
239
238
  this.connection.on('disconnect',
240
239
  ({ err }) => {