Skip to content

Commit

Permalink
Added worker limit
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Jan 27, 2022
1 parent c48db0d commit a100cd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config_example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"pool_id": 0,
"eth_pool_support": 1,
"worker_num": 0,
"bind_ip": "127.0.0.1",
"hostname": "testpool.com",
"db_storage_path": "CHANGEME",
Expand Down
2 changes: 1 addition & 1 deletion lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ function getUniqueWorkerID(cb) {
}

if (cluster.isMaster) {
const numWorkers = require('os').cpus().length;
const numWorkers = global.config.worker_num ? global.config.worker_num : require('os').cpus().length;
for (let i = 1; i <= numWorkers; ++ i) {
minerCount[i] = [];
global.config.ports.forEach(function (portData) {
Expand Down

0 comments on commit a100cd9

Please sign in to comment.