remove engine onReady

This commit is contained in:
Jonathan Rainville 2018-05-23 10:06:12 -04:00
parent 871c2fb228
commit 4815555a89
2 changed files with 17 additions and 34 deletions

View File

@ -13,7 +13,6 @@ const Pipeline = require('../pipeline/pipeline.js');
const Watch = require('../pipeline/watch.js');
const LibraryManager = require('../versions/library_manager.js');
const CodeRunner = require('../coderunner/codeRunner.js');
const constants = require('../constants');
const utils = require('../utils/utils');
class Engine {
@ -283,16 +282,6 @@ class Engine {
});
}
onReady(callback) {
if (this.isReady) {
return callback();
}
this.events.once(constants.blockchain.blockchainReady, () => {
this.isReady = true;
callback();
});
}
web3Service(options) {
this.blockchain = new Blockchain({
contractsConfig: this.config.contractsConfig,

View File

@ -151,7 +151,6 @@ class Embark {
engine.logger.info(__("Ready").underline);
engine.events.emit("status", __("Ready").green);
});
engine.onReady(() => {
engine.deployManager.deployContracts(function (err) {
engine.startService("fileWatcher");
if (options.runWebserver) {
@ -162,7 +161,6 @@ class Embark {
}
callback(err);
});
});
}
], function (err, _result) {
if (err) {
@ -219,11 +217,9 @@ class Embark {
callback();
},
function deploy(callback) {
engine.onReady(() => {
engine.deployManager.deployContracts(function (err) {
callback(err);
});
});
}
], function (err, _result) {
if (err) {
@ -388,7 +384,6 @@ class Embark {
.catch(callback);
});
engine.onReady(() => {
// 1. build the contracts and dapp webpack
engine.deployManager.deployContracts(function (err) {
engine.logger.info(__("finished deploying").underline);
@ -396,7 +391,6 @@ class Embark {
callback(err);
}
});
});
}
], function (err, _result) {
if (err) {