@tiledesk/tiledesk-tybot-connector 0.2.138-rc2 → 0.2.138-rc4
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/TdCache.js +7 -2
- package/index.js +4 -0
- package/package.json +1 -1
package/TdCache.js
CHANGED
|
@@ -3,9 +3,13 @@ const redis = require('redis');
|
|
|
3
3
|
class TdCache {
|
|
4
4
|
|
|
5
5
|
constructor(config) {
|
|
6
|
+
console.log("TdCache config: ", config);
|
|
6
7
|
this.redis_host = config.host;
|
|
7
8
|
this.redis_port = config.port;
|
|
8
9
|
this.redis_password = config.password;
|
|
10
|
+
console.log("TdCache this.redis_host: ", this.redis_host);
|
|
11
|
+
console.log("TdCache this.redis_port: ", this.redis_port);
|
|
12
|
+
console.log("TdCache this.redis_password: ", this.redis_password);
|
|
9
13
|
this.client = null;
|
|
10
14
|
this.redis_sub = null;
|
|
11
15
|
}
|
|
@@ -15,8 +19,9 @@ class TdCache {
|
|
|
15
19
|
return new Promise( async (resolve, reject) => {
|
|
16
20
|
this.client = redis.createClient(
|
|
17
21
|
{
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
url: `redis://${this.redis_host}:${this.redis_port}`,
|
|
23
|
+
// host: this.redis_host,
|
|
24
|
+
// port: this.redis_port,
|
|
20
25
|
password: this.redis_password
|
|
21
26
|
});
|
|
22
27
|
this.client.on('error', err => {
|
package/index.js
CHANGED
|
@@ -628,6 +628,9 @@ async function startApp(settings, completionCallback) {
|
|
|
628
628
|
}
|
|
629
629
|
|
|
630
630
|
if (settings.REDIS_HOST && settings.REDIS_PORT) {
|
|
631
|
+
console.log("startApp REDIS_HOST: ", settings.REDIS_HOST)
|
|
632
|
+
console.log("startApp REDIS_PORT: ", settings.REDIS_PORT)
|
|
633
|
+
console.log("startApp REDIS_PASSWORD: ", settings.REDIS_PASSWORD)
|
|
631
634
|
tdcache = new TdCache({
|
|
632
635
|
host: settings.REDIS_HOST,
|
|
633
636
|
port: settings.REDIS_PORT,
|
|
@@ -702,6 +705,7 @@ async function startApp(settings, completionCallback) {
|
|
|
702
705
|
}
|
|
703
706
|
|
|
704
707
|
async function connectRedis() {
|
|
708
|
+
console.log("connectRedis tdcache: ", tdcache)
|
|
705
709
|
if (tdcache) {
|
|
706
710
|
try {
|
|
707
711
|
console.log("(Tilebot) Connecting Redis...");
|