@pioneer-platform/default-redis 8.1.22 → 8.2.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/__tests__/test-module.js +78 -78
- package/package.json +2 -2
package/__tests__/test-module.js
CHANGED
@@ -10,87 +10,87 @@ const {redis,redisQueue} = require("../index")
|
|
10
10
|
*/
|
11
11
|
|
12
12
|
|
13
|
-
redis.info()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
let run_test = async function(){
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
13
|
+
// redis.info()
|
14
|
+
// .then(function(resp){
|
15
|
+
// console.log(resp)
|
16
|
+
// })
|
17
|
+
//
|
18
|
+
// let run_test = async function(){
|
19
|
+
// try{
|
20
|
+
//
|
21
|
+
// let insert = [
|
22
|
+
// {blal:"pw1"},
|
23
|
+
// {blal1:"pw1"},
|
24
|
+
// {blal2:"pw12"},
|
25
|
+
// {blal3:"pw1asda"},
|
26
|
+
// ]
|
27
|
+
//
|
28
|
+
//
|
29
|
+
// //add to set
|
30
|
+
// for(let i = 0; i < insert.length; i++){
|
31
|
+
// await redis.hset("TEST_ACCOUNTS",i)
|
32
|
+
// }
|
33
|
+
//
|
34
|
+
// let cursor = 0
|
35
|
+
//
|
36
|
+
// let is_killing = true
|
37
|
+
//
|
38
|
+
// let timeStart = new Date().getTime()
|
39
|
+
//
|
40
|
+
// while(is_killing){
|
41
|
+
// //murder keys marked for death
|
42
|
+
//
|
43
|
+
// //get
|
44
|
+
// let batch = await redis.scan(cursor)
|
45
|
+
// console.log("batch: ",batch)
|
46
|
+
//
|
47
|
+
// let keys = batch[1]
|
48
|
+
// cursor = batch[0]
|
49
|
+
// console.log(tag,"cursor: ",cursor)
|
50
|
+
//
|
51
|
+
// //check keys
|
52
|
+
// await check_keys(keys)
|
53
|
+
//
|
54
|
+
// //wait
|
55
|
+
// await sleep(300)
|
56
|
+
//
|
57
|
+
// //
|
58
|
+
// if(cursor == 0){
|
59
|
+
// is_killing = false
|
60
|
+
// }
|
61
|
+
//
|
62
|
+
// }
|
63
|
+
//
|
64
|
+
// let timeFinish = new Date().getTime()
|
65
|
+
//
|
66
|
+
// let duration = timeFinish - timeStart
|
67
|
+
// log.debug(tag,"duration: ",duration / 1000)
|
68
|
+
//
|
69
|
+
// //get all
|
70
|
+
// //scan
|
71
|
+
//
|
72
|
+
//
|
73
|
+
// //get highest
|
74
|
+
//
|
75
|
+
// //find missing
|
76
|
+
//
|
77
|
+
// //add missing
|
78
|
+
//
|
79
|
+
// //refify
|
80
|
+
//
|
81
|
+
// }catch(e){
|
82
|
+
// console.error(e)
|
83
|
+
// }
|
84
|
+
// }
|
85
|
+
// run_test()
|
78
86
|
|
79
|
-
//refify
|
80
87
|
|
81
|
-
|
82
|
-
|
83
|
-
|
88
|
+
let setReady = async function(){
|
89
|
+
console.log("online!")
|
90
|
+
let result = await redis.setex("ATOM:tx:signer:status",5,'online')
|
91
|
+
console.log("result: ",result)
|
84
92
|
}
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
// let setReady = async function(){
|
89
|
-
// console.log("online!")
|
90
|
-
// let result = await redis.setex("ATOM:tx:signer:status",5,'online')
|
91
|
-
// console.log("result: ",result)
|
92
|
-
// }
|
93
|
-
// setInterval(setReady,5000)
|
93
|
+
setInterval(setReady,5000)
|
94
94
|
|
95
95
|
|
96
96
|
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pioneer-platform/default-redis",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.2.0",
|
4
4
|
"dependencies": {
|
5
5
|
"dotenv": "^8.2.0",
|
6
6
|
"ioredis": "^4.17.3",
|
7
7
|
"ioredis-mock": "^4.21.1"
|
8
8
|
},
|
9
|
-
"gitHead": "
|
9
|
+
"gitHead": "85d1a59f3eec7851cc4b426ab69e1eabfcfc9954"
|
10
10
|
}
|