@tiledesk/tiledesk-whatsapp-connector 0.1.64 → 0.1.65
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/index.js +27 -19
- package/logs/app.log +566 -0
- package/package.json +1 -1
- package/routes/api.js +2 -1
- package/template/detail.html +3 -3
- package/template/detail_BACKUP_360.html +278 -0
- package/template/detail_BACKUP_640.html +278 -0
- package/template/detail_BASE_360.html +271 -0
- package/template/detail_BASE_640.html +271 -0
- package/template/detail_LOCAL_360.html +278 -0
- package/template/detail_LOCAL_640.html +278 -0
- package/template/detail_REMOTE_360.html +254 -0
- package/template/detail_REMOTE_640.html +254 -0
- package/tiledesk/KVBaseMongo.js +9 -0
package/index.js
CHANGED
|
@@ -1617,29 +1617,37 @@ async function startApp(settings, callback) {
|
|
|
1617
1617
|
winston.info("(wab) JOB_TOPIC_EXCHANGE is present");
|
|
1618
1618
|
}
|
|
1619
1619
|
|
|
1620
|
-
|
|
1621
|
-
if (
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1620
|
+
// For test only
|
|
1621
|
+
if (settings.LOG_MONGODB_URL) {
|
|
1622
|
+
/**
|
|
1623
|
+
* Connect with a different Database
|
|
1624
|
+
*/
|
|
1625
|
+
// mongoose
|
|
1626
|
+
// .connect(settings.LOG_MONGODB_URL)
|
|
1627
|
+
// .then(() => {
|
|
1628
|
+
// winston.info("Mongoose DB Connected");
|
|
1629
|
+
// })
|
|
1630
|
+
// .catch((err) => {
|
|
1631
|
+
// winston.error("(Mongoose) Unable to connect with MongoDB ", err);
|
|
1632
|
+
// });
|
|
1625
1633
|
}
|
|
1626
1634
|
|
|
1627
|
-
|
|
1628
|
-
.
|
|
1629
|
-
|
|
1630
|
-
|
|
1635
|
+
if (settings.dbconnection) {
|
|
1636
|
+
db.reuseConnection(settings.dbconnection, () => {
|
|
1637
|
+
winston.info("(wab) KVBaseMongo reused exsisting db connection");
|
|
1638
|
+
if (callback) {
|
|
1639
|
+
callback(null);
|
|
1640
|
+
}
|
|
1631
1641
|
})
|
|
1632
|
-
|
|
1633
|
-
|
|
1642
|
+
} else {
|
|
1643
|
+
db.connect(settings.MONGODB_URL, () => {
|
|
1644
|
+
winston.info("(wab) KVBaseMongo successfully connected.");
|
|
1645
|
+
|
|
1646
|
+
if (callback) {
|
|
1647
|
+
callback(null);
|
|
1648
|
+
}
|
|
1634
1649
|
});
|
|
1635
|
-
|
|
1636
|
-
db.connect(settings.MONGODB_URL, () => {
|
|
1637
|
-
winston.info("(wab) KVBaseMongo successfully connected.");
|
|
1638
|
-
|
|
1639
|
-
if (callback) {
|
|
1640
|
-
callback(null);
|
|
1641
|
-
}
|
|
1642
|
-
});
|
|
1650
|
+
}
|
|
1643
1651
|
|
|
1644
1652
|
api.startRoute(
|
|
1645
1653
|
{
|