Monitoring data retrieval job now working.
This commit is contained in:
parent
3cbb65f66d
commit
b84bfb5c99
|
@ -31,8 +31,7 @@ angular.module('ffffng').factory('Scheduler', function ($injector, Logger, confi
|
||||||
schedule('0 */1 * * * *', 'MailQueueJob');
|
schedule('0 */1 * * * *', 'MailQueueJob');
|
||||||
|
|
||||||
if (config.client.monitoring.enabled) {
|
if (config.client.monitoring.enabled) {
|
||||||
// schedule('0 */5 * * * *', 'NodeInformationRetrievalJob');
|
schedule('30 */5 * * * *', 'NodeInformationRetrievalJob');
|
||||||
schedule('*/10 * * * * *', 'NodeInformationRetrievalJob');
|
|
||||||
// schedule('0 */1 * * * *', 'NodeInformationCleanupJob');
|
// schedule('0 */1 * * * *', 'NodeInformationCleanupJob');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,11 +55,11 @@ angular.module('ffffng')
|
||||||
|
|
||||||
return Database.run(
|
return Database.run(
|
||||||
'UPDATE node_state ' +
|
'UPDATE node_state ' +
|
||||||
'WHERE id = ? AND mac = ?' +
|
'SET state = ?, last_seen = ?, import_timestamp = ?, modified_at = ?' +
|
||||||
'SET state = ?, last_seen = ?, import_timestamp = ?, modified_at = ?',
|
'WHERE id = ? AND mac = ?',
|
||||||
[
|
[
|
||||||
row.id, node.mac,
|
nodeData.state, nodeData.lastSeen.unix(), nodeData.importTimestamp.unix(), moment().unix(),
|
||||||
nodeData.state, nodeData.lastSeen.unix(), nodeData.importTimestamp.unix(), moment.unix()
|
row.id, node.mac
|
||||||
],
|
],
|
||||||
callback
|
callback
|
||||||
);
|
);
|
||||||
|
@ -92,7 +92,7 @@ angular.module('ffffng')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return deleteNodeInformation(node, callback);
|
return deleteNodeInformation(nodeData, node, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ angular.module('ffffng')
|
||||||
if (!_.isString(json.timestamp)) {
|
if (!_.isString(json.timestamp)) {
|
||||||
return moment.invalid();
|
return moment.invalid();
|
||||||
}
|
}
|
||||||
return moment(timestamp);
|
return moment.utc(timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|
Loading…
Reference in a new issue