Skip to content

Commit

Permalink
cluster check
Browse files Browse the repository at this point in the history
  • Loading branch information
mikers1 committed Oct 21, 2018
1 parent 0513053 commit adf4656
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ async function init(web3)

await webServer.init(https_enabled,webInterface,peerInterface)

peerInterface.update();

// Code to run if we're in a worker process
} else {
Expand Down
8 changes: 7 additions & 1 deletion lib/peer-interface.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

var cluster = require('cluster')
//var redis = require("redis");
var jayson = require('jayson');

Expand Down Expand Up @@ -57,7 +58,12 @@ module.exports = {

setTimeout(function(){self.processQueuedShares()},40)

setTimeout(function(){self.monitorMinedSolutions()},1000)


if (cluster.isMaster) {
console.log("CLUSTER IS MASETER");
setTimeout(function(){self.monitorMinedSolutions()},1000)
}



Expand Down

0 comments on commit adf4656

Please sign in to comment.