@mimik/rediser 1.4.13 → 1.4.15
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 +2 -3
- package/package.json +9 -9
package/index.js
CHANGED
|
@@ -11,7 +11,6 @@ const Promise = require('bluebird');
|
|
|
11
11
|
const type = 'redis';
|
|
12
12
|
const correlationId = `${type}-cache-start@0/${new Date().toISOString()}`;
|
|
13
13
|
|
|
14
|
-
const VALIDATION_CHECK = 100; // in ms
|
|
15
14
|
const CONNECTED = 1;
|
|
16
15
|
const DISCONNECTED = 2;
|
|
17
16
|
|
|
@@ -70,7 +69,7 @@ module.exports = (set, config) => {
|
|
|
70
69
|
else logger.info('creating a cache connection', { type, settings: redisSettings }, correlationId);
|
|
71
70
|
displayCreate = false;
|
|
72
71
|
}
|
|
73
|
-
const client = redis.createClient(redisSettings.url, redisSettings.options);
|
|
72
|
+
const client = redis.createClient({ url: redisSettings.url, ...redisSettings.options });
|
|
74
73
|
client.connect();
|
|
75
74
|
|
|
76
75
|
client.on('error', (err) => {
|
|
@@ -114,7 +113,7 @@ module.exports = (set, config) => {
|
|
|
114
113
|
}
|
|
115
114
|
}, config.redisSettings.connectTimeout * 1000); // convert in seconds
|
|
116
115
|
|
|
117
|
-
return Promise.delay(
|
|
116
|
+
return Promise.delay(redisSettings.validationCheck).then(() => {
|
|
118
117
|
if (state !== DISCONNECTED && state !== CONNECTED) {
|
|
119
118
|
const error = new Error(`cache connection not established: ${state}`);
|
|
120
119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/rediser",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.15",
|
|
4
4
|
"description": "Helper for setting up redis using redis for mimik microservices",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
"url": "https://bitbucket.org/mimiktech/rediser"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mimik/lib-filters": "^1.4.
|
|
33
|
-
"@mimik/sumologic-winston-logger": "^1.6.
|
|
32
|
+
"@mimik/lib-filters": "^1.4.8",
|
|
33
|
+
"@mimik/sumologic-winston-logger": "^1.6.19",
|
|
34
34
|
"bluebird": "3.7.2",
|
|
35
|
-
"redis": "4.
|
|
35
|
+
"redis": "4.6.8"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@mimik/eslint-plugin-dependencies": "^2.4.5",
|
|
39
39
|
"@mimik/eslint-plugin-document-env": "^1.0.5",
|
|
40
|
-
"eslint": "8.
|
|
40
|
+
"eslint": "8.48.0",
|
|
41
41
|
"eslint-config-airbnb": "19.0.4",
|
|
42
|
-
"eslint-plugin-import": "2.
|
|
43
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
44
|
-
"eslint-plugin-react": "7.
|
|
42
|
+
"eslint-plugin-import": "2.28.1",
|
|
43
|
+
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
44
|
+
"eslint-plugin-react": "7.33.2",
|
|
45
45
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
46
|
-
"husky": "8.0.
|
|
46
|
+
"husky": "8.0.3",
|
|
47
47
|
"jsdoc-to-markdown": "8.0.0"
|
|
48
48
|
}
|
|
49
49
|
}
|