@abtnode/util 1.16.52-beta-20250917-070942-7ee57044 → 1.16.52-beta-20250922-225859-f34775fa
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.
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
const os = require('os');
|
|
2
2
|
|
|
3
|
-
const getDaemonInstanceCount = () => {
|
|
4
|
-
return +process.env.ABT_NODE_DAEMON_CLUSTER_SIZE || 1;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
3
|
const getServiceInstanceCount = () => {
|
|
8
4
|
// unit: GB
|
|
9
5
|
const memorySize = Math.floor(os.totalmem() / 1024 / 1024 / 1024) || 1;
|
|
@@ -15,6 +11,13 @@ const getServiceInstanceCount = () => {
|
|
|
15
11
|
return Math.max(Math.min(memorySize, cpuLength, customConfig), 1);
|
|
16
12
|
};
|
|
17
13
|
|
|
14
|
+
const getDaemonInstanceCount = () => {
|
|
15
|
+
if (process.env.ABT_NODE_DAEMON_CLUSTER_SIZE === undefined) {
|
|
16
|
+
return getServiceInstanceCount();
|
|
17
|
+
}
|
|
18
|
+
return +process.env.ABT_NODE_DAEMON_CLUSTER_SIZE || 1;
|
|
19
|
+
};
|
|
20
|
+
|
|
18
21
|
module.exports = {
|
|
19
22
|
getDaemonInstanceCount,
|
|
20
23
|
getServiceInstanceCount,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.52-beta-
|
|
6
|
+
"version": "1.16.52-beta-20250922-225859-f34775fa",
|
|
7
7
|
"description": "ArcBlock's JavaScript utility",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@abtnode/constant": "1.16.52-beta-
|
|
22
|
-
"@abtnode/db-cache": "1.16.52-beta-
|
|
21
|
+
"@abtnode/constant": "1.16.52-beta-20250922-225859-f34775fa",
|
|
22
|
+
"@abtnode/db-cache": "1.16.52-beta-20250922-225859-f34775fa",
|
|
23
23
|
"@arcblock/did": "1.24.0",
|
|
24
24
|
"@arcblock/event-hub": "1.24.0",
|
|
25
25
|
"@arcblock/pm2": "^6.0.12",
|
|
26
|
-
"@blocklet/constant": "1.16.52-beta-
|
|
26
|
+
"@blocklet/constant": "1.16.52-beta-20250922-225859-f34775fa",
|
|
27
27
|
"@blocklet/error": "^0.2.5",
|
|
28
|
-
"@blocklet/meta": "1.16.52-beta-
|
|
28
|
+
"@blocklet/meta": "1.16.52-beta-20250922-225859-f34775fa",
|
|
29
29
|
"@blocklet/xss": "^0.2.7",
|
|
30
30
|
"@ocap/client": "1.24.0",
|
|
31
31
|
"@ocap/mcrypto": "1.24.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"fs-extra": "^11.2.0",
|
|
92
92
|
"jest": "^29.7.0"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "c0e0111f82032eac108bd37fd633b47e6db38870"
|
|
95
95
|
}
|