add more logs
This commit is contained in:
@@ -193,6 +193,7 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startForwordingForDevice(device) {
|
function startForwordingForDevice(device) {
|
||||||
|
console.log("startForwordingForDevice() called")
|
||||||
const execSync = require('child_process').execSync;
|
const execSync = require('child_process').execSync;
|
||||||
// get attributed port
|
// get attributed port
|
||||||
let attributedPort = device_port_info[device.serial()]
|
let attributedPort = device_port_info[device.serial()]
|
||||||
@@ -217,7 +218,10 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
|
|||||||
let sender = new Sender()
|
let sender = new Sender()
|
||||||
sender.initConnection().then((r) => {
|
sender.initConnection().then((r) => {
|
||||||
console.log("queue connected")
|
console.log("queue connected")
|
||||||
|
console.log("connect to mongodb")
|
||||||
mongoManager.connect().then(r => {
|
mongoManager.connect().then(r => {
|
||||||
|
console.log("successfully connected to mongodb")
|
||||||
|
|
||||||
filterAlreadyBookedContacts(contactList).then((listToBook) => {
|
filterAlreadyBookedContacts(contactList).then((listToBook) => {
|
||||||
filterAlreadyAcceptedContacts(listToBook).then(notAcceptedContacts => {
|
filterAlreadyAcceptedContacts(listToBook).then(notAcceptedContacts => {
|
||||||
filterBlacklistedContacts(notAcceptedContacts).then(listWithoutBlackContact => {
|
filterBlacklistedContacts(notAcceptedContacts).then(listWithoutBlackContact => {
|
||||||
|
|||||||
+3
-1
@@ -9,7 +9,9 @@ class Sender {
|
|||||||
connection;
|
connection;
|
||||||
|
|
||||||
async initConnection() {
|
async initConnection() {
|
||||||
this.connection = await amqp.connect(QUEUE_HOST);
|
this.connection = await amqp.connect(QUEUE_HOST, {
|
||||||
|
timeout: 15000
|
||||||
|
});
|
||||||
this.channel = await this.connection.createChannel();
|
this.channel = await this.connection.createChannel();
|
||||||
await this.channel.assertQueue(REQUEST_DATA_QUEUE_FR, {persistent: true});
|
await this.channel.assertQueue(REQUEST_DATA_QUEUE_FR, {persistent: true});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user