mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-12-01 11:43:58 +01:00
Put a backup check for template updates to try and grab one every 60 seconds.
This commit is contained in:
+2
-7
@@ -125,13 +125,7 @@ process.on('message', messageHandler);
|
|||||||
function sendToWorkers(data) {
|
function sendToWorkers(data) {
|
||||||
let goodWorkers = [];
|
let goodWorkers = [];
|
||||||
workerList.forEach(function (worker) {
|
workerList.forEach(function (worker) {
|
||||||
try {
|
worker.send(data);
|
||||||
if (worker.send(data)) {
|
|
||||||
goodWorkers.push(worker);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(threadName + "Worker dead. Not sending new messages.");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
workerList = goodWorkers;
|
workerList = goodWorkers;
|
||||||
}
|
}
|
||||||
@@ -783,6 +777,7 @@ if (cluster.isMaster) {
|
|||||||
templateUpdate(false);
|
templateUpdate(false);
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
bannedIPs = [];
|
bannedIPs = [];
|
||||||
|
templateUpdate(false);
|
||||||
}, 60000);
|
}, 60000);
|
||||||
async.each(global.config.ports, function (portData) {
|
async.each(global.config.ports, function (portData) {
|
||||||
if (global.config[portData.portType].enable !== true){
|
if (global.config[portData.portType].enable !== true){
|
||||||
|
|||||||
Reference in New Issue
Block a user