Typescript migration: Major refactoring.
This commit is contained in:
parent
31ecc0cf4f
commit
52822207a5
31 changed files with 2068 additions and 2268 deletions
|
@ -1,22 +1,8 @@
|
|||
import Logger from "../logger";
|
||||
import MonitoringService from "../services/monitoringService";
|
||||
import * as MonitoringService from "../services/monitoringService";
|
||||
|
||||
export default {
|
||||
name: 'NodeInformationRetrievalJob',
|
||||
description: 'Fetches the nodes.json and calculates and stores the monitoring / online status for registered nodes.',
|
||||
|
||||
run: (): Promise<void> => {
|
||||
return new Promise<void>(
|
||||
(resolve, reject) => {
|
||||
MonitoringService.retrieveNodeInformation((err: any): void => {
|
||||
if (err) {
|
||||
Logger.tag('monitoring', 'information-retrieval').error('Error retrieving node data:', err);
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
run: MonitoringService.retrieveNodeInformation,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue