@tiledesk/tiledesk-tybot-connector 2.0.7-rc2 → 2.0.7-rc3

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.
Files changed (2) hide show
  1. package/Logger.js +6 -6
  2. package/package.json +1 -1
package/Logger.js CHANGED
@@ -6,7 +6,7 @@ const LOGS_BASE_ROUTING_KEY = process.env.LOGS_BASE_ROUTING_KEY || "apps.tilecha
6
6
 
7
7
  const levels = { error: 0, warn: 1, info: 2, debug: 3 };
8
8
 
9
- this.publisher = new Publisher(AMQP_MANAGER_URL, {
9
+ let publisher = new Publisher(AMQP_MANAGER_URL, {
10
10
  debug: false,
11
11
  queueName: "logs_queue",
12
12
  exchange: "amq.topic"
@@ -73,14 +73,14 @@ class Logger {
73
73
  }
74
74
 
75
75
  base(level, text) {
76
- if (!this.request_id || !this.publisher) {
77
- console.log("Return because request or publisher is undefined", this.request_id, this.publisher);
76
+ if (!this.request_id || !publisher) {
77
+ console.log("Return because request or publisher is undefined", this.request_id, publisher);
78
78
  return;
79
79
  }
80
80
 
81
81
  let data = {
82
82
  request_id: this.request_id,
83
- id_project: request_id.split("-")[2],
83
+ id_project: this.request_id.split("-")[2],
84
84
  text: text,
85
85
  level: level,
86
86
  nlevel: levels[level],
@@ -88,8 +88,8 @@ class Logger {
88
88
  dev: this.dev
89
89
  }
90
90
 
91
- let topic = LOGS_BASE_ROUTING_KEY + `.${request_id}`;
92
- this.publisher.publish(data, topic);
91
+ let topic = LOGS_BASE_ROUTING_KEY + `.${this.request_id}`;
92
+ publisher.publish(data, topic);
93
93
  return;
94
94
  }
95
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "2.0.7-rc2",
3
+ "version": "2.0.7-rc3",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {