diff --git a/lib/contracts/blockchain.js b/lib/contracts/blockchain.js index 76c995fa..999ae142 100644 --- a/lib/contracts/blockchain.js +++ b/lib/contracts/blockchain.js @@ -143,7 +143,7 @@ class Blockchain { } cb(statusObj); }); - }); + }, 5000, 'off'); } registerRequests() { diff --git a/lib/core/services_monitor.js b/lib/core/services_monitor.js index 1cfc506e..c1342212 100644 --- a/lib/core/services_monitor.js +++ b/lib/core/services_monitor.js @@ -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.checkList[checkName] = {fn: checkFn, interval: time || 5000}; + this.checkList[checkName] = {fn: checkFn, interval: time || 5000, status: initialState}; if (this.working) { this.initCheck(checkName); diff --git a/lib/index.js b/lib/index.js index 41f93fc4..3fa03096 100644 --- a/lib/index.js +++ b/lib/index.js @@ -190,16 +190,14 @@ class Embark { engine.logger.info(__("Ready").underline); engine.events.emit("status", __("Ready").green); }); - engine.deployManager.deployContracts(function (err) { - engine.startService("fileWatcher"); - if (options.runWebserver) { - engine.startService("webServer", { - host: options.serverHost, - port: options.serverPort - }); - } - callback(err); - }); + if (options.runWebserver) { + engine.startService("webServer", { + host: options.serverHost, + port: options.serverPort + }); + } + engine.startService("fileWatcher"); + callback(); } ], function (err, _result) { if (err) { diff --git a/package-lock.json b/package-lock.json index 1cd7df4c..d640c648 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3591,7 +3591,7 @@ "ethereumjs-testrpc": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/ethereumjs-testrpc/-/ethereumjs-testrpc-6.0.3.tgz", - "integrity": "sha1-eguHvzZw+S9gf5j6aniAHZdBsSQ=", + "integrity": "sha512-lAxxsxDKK69Wuwqym2K49VpXtBvLEsXr1sryNG4AkvL5DomMdeCBbu3D87UEevKenLHBiT8GTjARwN6Yj039gA==", "requires": { "webpack": "3.11.0" }, @@ -7772,7 +7772,6 @@ "version": "1.0.35", "resolved": "https://registry.npmjs.org/node-webcrypto-ossl/-/node-webcrypto-ossl-1.0.35.tgz", "integrity": "sha512-KsdlCw0hTmSa4bos7BzEa7Ag9qsDgFAMi/X+Wq+OMpKjjEPZ+JQZKmuU2leiI4dXC6i8RpdGTRFRiw9bvxk8/w==", - "optional": true, "requires": { "mkdirp": "0.5.1", "nan": "2.9.2", @@ -12033,7 +12032,6 @@ "version": "0.1.19", "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-0.1.19.tgz", "integrity": "sha512-RyaWaYYwFUeWVB1ny8Oj53UQJppNLyz+RWFv0IPP8W6l95kFS+jHS+4vH42o3VJaiom5EIogwmngY57Bwy5DDQ==", - "optional": true, "requires": { "tslib": "1.9.0" }