@midwayjs/redis 3.4.0-beta.7 → 3.4.0
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/dist/manager.js +9 -6
- package/package.json +5 -5
package/dist/manager.js
CHANGED
|
@@ -41,12 +41,15 @@ let RedisServiceFactory = class RedisServiceFactory extends core_1.ServiceFactor
|
|
|
41
41
|
this.logger.info('[midway:redis] server connecting redis://:***@%s:%s/%s', config.host, config.port);
|
|
42
42
|
client = new ioredis_1.default(config);
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
await new Promise((resolve, reject) => {
|
|
45
|
+
client.on('connect', () => {
|
|
46
|
+
this.logger.info('[midway:redis] client connect success');
|
|
47
|
+
resolve();
|
|
48
|
+
});
|
|
49
|
+
client.on('error', err => {
|
|
50
|
+
this.logger.error('[midway:redis] client error: %s', err);
|
|
51
|
+
reject(err);
|
|
52
|
+
});
|
|
50
53
|
});
|
|
51
54
|
return client;
|
|
52
55
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/redis",
|
|
3
3
|
"description": "midway redis component",
|
|
4
|
-
"version": "3.4.0
|
|
4
|
+
"version": "3.4.0",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"index.d.ts"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@midwayjs/core": "^3.4.0
|
|
14
|
-
"@midwayjs/decorator": "^3.4.0
|
|
15
|
-
"@midwayjs/mock": "^3.4.0
|
|
13
|
+
"@midwayjs/core": "^3.4.0",
|
|
14
|
+
"@midwayjs/decorator": "^3.4.0",
|
|
15
|
+
"@midwayjs/mock": "^3.4.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"ioredis": "^5.0.0"
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"type": "git",
|
|
37
37
|
"url": "https://github.com/midwayjs/midway.git"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "e48ea9cb52c6e70ab25b68f1188006100eab8184"
|
|
40
40
|
}
|