use monitor as a service
This commit is contained in:
parent
37d54e22db
commit
eadbeb0498
|
@ -71,15 +71,6 @@ class Engine {
|
|||
};
|
||||
}
|
||||
|
||||
startMonitor() {
|
||||
const self = this;
|
||||
this.servicesMonitor = new ServicesMonitor({events: this.events, logger: this.logger, plugins: this.plugins});
|
||||
this.servicesMonitor.addCheck('embarkVersion', function (cb) {
|
||||
return cb({name: 'Embark ' + self.version, status: 'on'});
|
||||
}, 0);
|
||||
this.servicesMonitor.startMonitor();
|
||||
}
|
||||
|
||||
registerModule(moduleName, options) {
|
||||
this.plugins.loadInternalPlugin(moduleName, options || {});
|
||||
}
|
||||
|
@ -88,6 +79,7 @@ class Engine {
|
|||
let options = _options || {};
|
||||
|
||||
let services = {
|
||||
"serviceMonitor": this.serviceMonitor,
|
||||
"pipeline": this.pipelineService,
|
||||
"codeRunner": this.codeRunnerService,
|
||||
"codeGenerator": this.codeGeneratorService,
|
||||
|
@ -134,6 +126,15 @@ class Engine {
|
|||
});
|
||||
}
|
||||
|
||||
serviceMonitor() {
|
||||
const self = this;
|
||||
this.servicesMonitor = new ServicesMonitor({events: this.events, logger: this.logger, plugins: this.plugins});
|
||||
this.servicesMonitor.addCheck('embarkVersion', function (cb) {
|
||||
return cb({name: 'Embark ' + self.version, status: 'on'});
|
||||
}, 0);
|
||||
this.servicesMonitor.startMonitor();
|
||||
}
|
||||
|
||||
namingSystem(_options) {
|
||||
this.registerModule('ens');
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ class Embark {
|
|||
engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", "));
|
||||
}
|
||||
|
||||
engine.startMonitor();
|
||||
engine.startService("serviceMonitor");
|
||||
engine.startService("libraryManager");
|
||||
engine.startService("codeRunner");
|
||||
engine.startService("web3");
|
||||
|
@ -238,7 +238,7 @@ class Embark {
|
|||
engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", "));
|
||||
}
|
||||
|
||||
engine.startMonitor();
|
||||
engine.startService("serviceMonitor");
|
||||
engine.startService("libraryManager");
|
||||
engine.startService("pipeline");
|
||||
engine.startService("deployment", {onlyCompile: true});
|
||||
|
@ -300,7 +300,7 @@ class Embark {
|
|||
|
||||
function startServices(callback) {
|
||||
|
||||
engine.startMonitor();
|
||||
engine.startService("serviceMonitor");
|
||||
engine.startService("libraryManager");
|
||||
engine.startService("codeRunner");
|
||||
engine.startService("web3");
|
||||
|
|
Loading…
Reference in New Issue