rsibot-utils 1.1.0 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +13 -13
- package/package.json +15 -15
package/index.js
CHANGED
@@ -27,7 +27,7 @@ async function execute(command) {
|
|
27
27
|
write(`${stdout}`);
|
28
28
|
return stdout;
|
29
29
|
} catch (error) {
|
30
|
-
write(error);
|
30
|
+
write(error,true);
|
31
31
|
throw Error(error);
|
32
32
|
}
|
33
33
|
}
|
@@ -40,7 +40,7 @@ async function insertHotCoin({ symbol }) {
|
|
40
40
|
await newHotCoin.save();
|
41
41
|
return symbol;
|
42
42
|
} catch (error) {
|
43
|
-
write(error.stack);
|
43
|
+
write(error.stack,true);
|
44
44
|
return false;
|
45
45
|
}
|
46
46
|
}
|
@@ -49,7 +49,7 @@ async function getHotCoins() {
|
|
49
49
|
const results = await HotCoin.find();
|
50
50
|
return results;
|
51
51
|
} catch (error) {
|
52
|
-
write(error.stack);
|
52
|
+
write(error.stack,true);
|
53
53
|
return [];
|
54
54
|
}
|
55
55
|
}
|
@@ -58,7 +58,7 @@ async function removeHotCoin(symbol) {
|
|
58
58
|
await HotCoin.deleteOne({ symbol });
|
59
59
|
return symbol;
|
60
60
|
} catch (error) {
|
61
|
-
write(error.stack);
|
61
|
+
write(error.stack,true);
|
62
62
|
return false;
|
63
63
|
}
|
64
64
|
}
|
@@ -68,7 +68,7 @@ async function getActiveCoins() {
|
|
68
68
|
const results = await ActiveCoin.find();
|
69
69
|
return results;
|
70
70
|
} catch (error) {
|
71
|
-
write(error.stack);
|
71
|
+
write(error.stack,true);
|
72
72
|
return [];
|
73
73
|
}
|
74
74
|
}
|
@@ -81,7 +81,7 @@ async function getQueue() {
|
|
81
81
|
return [];
|
82
82
|
}
|
83
83
|
} catch (error) {
|
84
|
-
write(error.stack);
|
84
|
+
write(error.stack,true);
|
85
85
|
return [];
|
86
86
|
}
|
87
87
|
}
|
@@ -92,7 +92,7 @@ async function setQueue(queue) {
|
|
92
92
|
const newQueue = new Queue({ queue });
|
93
93
|
await newQueue.save();
|
94
94
|
} catch (error) {
|
95
|
-
write(error.stack);
|
95
|
+
write(error.stack,true);
|
96
96
|
}
|
97
97
|
}
|
98
98
|
}
|
@@ -104,7 +104,7 @@ async function removeCoin(symbol, queue) {
|
|
104
104
|
const newQueue = new Queue({ queue: modifiedQueue });
|
105
105
|
await newQueue.save();
|
106
106
|
} catch (error) {
|
107
|
-
write(error.stack);
|
107
|
+
write(error.stack,true);
|
108
108
|
}
|
109
109
|
}
|
110
110
|
function initQueueListener() {
|
@@ -115,7 +115,7 @@ async function getAbandonedCoins() {
|
|
115
115
|
const abandonedCoins = await ActiveCoin.find({ abandoned: true });
|
116
116
|
return abandonedCoins;
|
117
117
|
} catch (error) {
|
118
|
-
write(error.stack);
|
118
|
+
write(error.stack,true);
|
119
119
|
return [];
|
120
120
|
}
|
121
121
|
}
|
@@ -124,28 +124,28 @@ async function createNewHistory(coinObj) {
|
|
124
124
|
const newHistory = new Historical(coinObj);
|
125
125
|
await newHistory.save();
|
126
126
|
} catch (error) {
|
127
|
-
write(error.stack);
|
127
|
+
write(error.stack,true);
|
128
128
|
}
|
129
129
|
}
|
130
130
|
async function deleteHotCoins() {
|
131
131
|
try {
|
132
132
|
await HotCoin.deleteMany({ symbol: { $exists: true } });
|
133
133
|
} catch (error) {
|
134
|
-
write(error.stack);
|
134
|
+
write(error.stack,true);
|
135
135
|
}
|
136
136
|
}
|
137
137
|
async function deleteActiveCoins() {
|
138
138
|
try {
|
139
139
|
await ActiveCoin.deleteMany({ symbol: { $exists: true } });
|
140
140
|
} catch (error) {
|
141
|
-
write(error);
|
141
|
+
write(error,true);
|
142
142
|
}
|
143
143
|
}
|
144
144
|
async function deleteQueueCoins() {
|
145
145
|
try {
|
146
146
|
await Queue.deleteMany({ created: { $exists: true } });
|
147
147
|
} catch (error) {
|
148
|
-
write(error.stack);
|
148
|
+
write(error.stack,true);
|
149
149
|
}
|
150
150
|
}
|
151
151
|
module.exports = {
|
package/package.json
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
{
|
2
|
-
"name": "rsibot-utils",
|
3
|
-
"version": "1.1.
|
4
|
-
"description": "",
|
5
|
-
"main": "index.js",
|
6
|
-
"scripts": {
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
-
},
|
9
|
-
"keywords": [],
|
10
|
-
"author": "",
|
11
|
-
"license": "ISC",
|
12
|
-
"dependencies": {
|
13
|
-
"mongoose": "^6.2.9"
|
14
|
-
}
|
15
|
-
}
|
1
|
+
{
|
2
|
+
"name": "rsibot-utils",
|
3
|
+
"version": "1.1.4",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": [],
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"mongoose": "^6.2.9"
|
14
|
+
}
|
15
|
+
}
|