start blockchain process at false and deploy on ready

This commit is contained in:
Jonathan Rainville 2018-05-30 12:00:44 -04:00
parent 138aaf39ff
commit b5d9a86680
4 changed files with 12 additions and 16 deletions

View File

@ -143,7 +143,7 @@ class Blockchain {
} }
cb(statusObj); cb(statusObj);
}); });
}); }, 5000, 'off');
} }
registerRequests() { registerRequests() {

View File

@ -44,9 +44,9 @@ ServicesMonitor.prototype.initCheck = function (checkName) {
}); });
}; };
ServicesMonitor.prototype.addCheck = function (checkName, checkFn, time) { ServicesMonitor.prototype.addCheck = function (checkName, checkFn, time, initialState) {
this.logger.trace('add check: ' + checkName); this.logger.trace('add check: ' + checkName);
this.checkList[checkName] = {fn: checkFn, interval: time || 5000}; this.checkList[checkName] = {fn: checkFn, interval: time || 5000, status: initialState};
if (this.working) { if (this.working) {
this.initCheck(checkName); this.initCheck(checkName);

View File

@ -190,16 +190,14 @@ class Embark {
engine.logger.info(__("Ready").underline); engine.logger.info(__("Ready").underline);
engine.events.emit("status", __("Ready").green); engine.events.emit("status", __("Ready").green);
}); });
engine.deployManager.deployContracts(function (err) {
engine.startService("fileWatcher");
if (options.runWebserver) { if (options.runWebserver) {
engine.startService("webServer", { engine.startService("webServer", {
host: options.serverHost, host: options.serverHost,
port: options.serverPort port: options.serverPort
}); });
} }
callback(err); engine.startService("fileWatcher");
}); callback();
} }
], function (err, _result) { ], function (err, _result) {
if (err) { if (err) {

4
package-lock.json generated
View File

@ -3591,7 +3591,7 @@
"ethereumjs-testrpc": { "ethereumjs-testrpc": {
"version": "6.0.3", "version": "6.0.3",
"resolved": "https://registry.npmjs.org/ethereumjs-testrpc/-/ethereumjs-testrpc-6.0.3.tgz", "resolved": "https://registry.npmjs.org/ethereumjs-testrpc/-/ethereumjs-testrpc-6.0.3.tgz",
"integrity": "sha1-eguHvzZw+S9gf5j6aniAHZdBsSQ=", "integrity": "sha512-lAxxsxDKK69Wuwqym2K49VpXtBvLEsXr1sryNG4AkvL5DomMdeCBbu3D87UEevKenLHBiT8GTjARwN6Yj039gA==",
"requires": { "requires": {
"webpack": "3.11.0" "webpack": "3.11.0"
}, },
@ -7772,7 +7772,6 @@
"version": "1.0.35", "version": "1.0.35",
"resolved": "https://registry.npmjs.org/node-webcrypto-ossl/-/node-webcrypto-ossl-1.0.35.tgz", "resolved": "https://registry.npmjs.org/node-webcrypto-ossl/-/node-webcrypto-ossl-1.0.35.tgz",
"integrity": "sha512-KsdlCw0hTmSa4bos7BzEa7Ag9qsDgFAMi/X+Wq+OMpKjjEPZ+JQZKmuU2leiI4dXC6i8RpdGTRFRiw9bvxk8/w==", "integrity": "sha512-KsdlCw0hTmSa4bos7BzEa7Ag9qsDgFAMi/X+Wq+OMpKjjEPZ+JQZKmuU2leiI4dXC6i8RpdGTRFRiw9bvxk8/w==",
"optional": true,
"requires": { "requires": {
"mkdirp": "0.5.1", "mkdirp": "0.5.1",
"nan": "2.9.2", "nan": "2.9.2",
@ -12033,7 +12032,6 @@
"version": "0.1.19", "version": "0.1.19",
"resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-0.1.19.tgz", "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-0.1.19.tgz",
"integrity": "sha512-RyaWaYYwFUeWVB1ny8Oj53UQJppNLyz+RWFv0IPP8W6l95kFS+jHS+4vH42o3VJaiom5EIogwmngY57Bwy5DDQ==", "integrity": "sha512-RyaWaYYwFUeWVB1ny8Oj53UQJppNLyz+RWFv0IPP8W6l95kFS+jHS+4vH42o3VJaiom5EIogwmngY57Bwy5DDQ==",
"optional": true,
"requires": { "requires": {
"tslib": "1.9.0" "tslib": "1.9.0"
} }