Added check for missing daemon config

This commit is contained in:
Matt 2014-04-08 11:38:19 -06:00
parent 33aa07a23e
commit c1caaf94e1
1 changed files with 5 additions and 18 deletions

23
init.js
View File

@ -115,6 +115,11 @@ var spawnPoolWorkers = function(portalConfig, poolConfigs){
logger.error('Master', coin, 'Share processing is not configured so a pool cannot be started for this coin.');
delete poolConfigs[coin];
}
if (p.daemons.length < 1){
logger.error('Master', coin, 'No daemons configured so a pool cannot be started for this coin.');
delete poolConfigs[coin];
}
});
if (Object.keys(poolConfigs).length === 0){
@ -214,24 +219,6 @@ var startCoinswitchListener = function(portalConfig){
});
listener.start();
/*
if !cluster.isWorker
else {
var coinNames = ['Emoticoin','Infinitecoin'];
var curIndex = 0;
setInterval(function () {
var newCoinName = coinNames[++curIndex % coinNames.length];
console.log("SWITCHING to " + newCoinName);
var ipcMessage = {
type:'switch',
coin: newCoinName
};
Object.keys(cluster.workers).forEach(function(id) {
cluster.workers[id].send(ipcMessage);
});
}, 30000);
}
*/
};