mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
Fix ac monitor status checking in server console
This commit is contained in:
parent
9e9c124d0b
commit
5f1a159e1d
2 changed files with 3 additions and 5 deletions
|
@ -61,7 +61,6 @@ ready = function() {
|
|||
|
||||
var oldLogFilePaths = Object.keys(watchList);
|
||||
var diff = difference(oldLogFilePaths, newLogFilePaths);
|
||||
console.log('diff', diff);
|
||||
// For each removed file, remove it from our watch list
|
||||
diff.subtract.forEach(function(removedLogFilePath) {
|
||||
watchList[removedLogFilePath].unwatch();
|
||||
|
|
|
@ -272,7 +272,7 @@ Process.prototype = extend(Process.prototype, {
|
|||
|
||||
// ACMonitorProcess is an extension of Process that keeps track of the AC Montior's
|
||||
// children status and log locations.
|
||||
const CHECK_AC_STATUS_INTERVAL = 5000;
|
||||
const CHECK_AC_STATUS_INTERVAL = 1000;
|
||||
function ACMonitorProcess(name, path, args, httpStatusPort, logPath) {
|
||||
Process.call(this, name, path, args, logPath);
|
||||
|
||||
|
@ -312,7 +312,6 @@ ACMonitorProcess.prototype = extend(ACMonitorProcess.prototype, {
|
|||
stderr: this.childServers[pid].logStderr
|
||||
}
|
||||
}
|
||||
console.log(logs);
|
||||
return logs;
|
||||
},
|
||||
_updateACMonitorStatus: function() {
|
||||
|
@ -325,18 +324,18 @@ ACMonitorProcess.prototype = extend(ACMonitorProcess.prototype, {
|
|||
return;
|
||||
}
|
||||
|
||||
console.log("Checking AC Monitor status");
|
||||
var options = {
|
||||
url: "http://localhost:" + this.httpStatusPort + "/status",
|
||||
json: true
|
||||
};
|
||||
this.pendingRequest = request(options, function(error, response, body) {
|
||||
this.pendingRequest = null;
|
||||
|
||||
if (error) {
|
||||
console.error('ERROR Getting AC Monitor status', error);
|
||||
} else {
|
||||
this.childServers = body.servers;
|
||||
}
|
||||
console.log(body);
|
||||
|
||||
this.emit('logs-updated');
|
||||
|
||||
|
|
Loading…
Reference in a new issue