mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
remove engine onReady
This commit is contained in:
parent
871c2fb228
commit
4815555a89
@ -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,
|
||||
|
40
lib/index.js
40
lib/index.js
@ -151,17 +151,15 @@ 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) {
|
||||
engine.startService("webServer", {
|
||||
host: options.serverHost,
|
||||
port: options.serverPort
|
||||
});
|
||||
}
|
||||
callback(err);
|
||||
});
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
engine.startService("fileWatcher");
|
||||
if (options.runWebserver) {
|
||||
engine.startService("webServer", {
|
||||
host: options.serverHost,
|
||||
port: options.serverPort
|
||||
});
|
||||
}
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
], function (err, _result) {
|
||||
@ -219,10 +217,8 @@ class Embark {
|
||||
callback();
|
||||
},
|
||||
function deploy(callback) {
|
||||
engine.onReady(() => {
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
callback(err);
|
||||
});
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
], function (err, _result) {
|
||||
@ -388,14 +384,12 @@ class Embark {
|
||||
.catch(callback);
|
||||
});
|
||||
|
||||
engine.onReady(() => {
|
||||
// 1. build the contracts and dapp webpack
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
engine.logger.info(__("finished deploying").underline);
|
||||
if(err){
|
||||
callback(err);
|
||||
}
|
||||
});
|
||||
// 1. build the contracts and dapp webpack
|
||||
engine.deployManager.deployContracts(function (err) {
|
||||
engine.logger.info(__("finished deploying").underline);
|
||||
if(err){
|
||||
callback(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
], function (err, _result) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user