fix(@embark/cmd_controller): ensure namesystem is set up in console command (#1822)

This caused the console command to hang
This commit is contained in:
Pascal Precht 2019-09-03 17:59:00 +02:00 committed by Iuri Matias
parent c7eb5868b9
commit dd82a01b65
1 changed files with 6 additions and 2 deletions

View File

@ -440,6 +440,7 @@ class EmbarkController {
engine.registerModuleGroup("contracts"); engine.registerModuleGroup("contracts");
engine.registerModuleGroup("pipeline"); engine.registerModuleGroup("pipeline");
engine.registerModuleGroup("communication"); engine.registerModuleGroup("communication");
engine.registerModuleGroup("namesystem");
engine.registerModulePackage('embark-deploy-tracker', {plugins: engine.plugins}); engine.registerModulePackage('embark-deploy-tracker', {plugins: engine.plugins});
engine.registerModuleGroup("blockchain"); engine.registerModuleGroup("blockchain");
@ -459,7 +460,8 @@ class EmbarkController {
try { try {
await Promise.all([ await Promise.all([
engine.events.request2("blockchain:node:start", engine.config.blockchainConfig), engine.events.request2("blockchain:node:start", engine.config.blockchainConfig),
engine.events.request2("communication:node:start", engine.config.communicationConfig) engine.events.request2("communication:node:start", engine.config.communicationConfig),
engine.events.request2("namesystem:node:start", engine.config.namesystemConfig)
]); ]);
} catch (e) { } catch (e) {
return cb(e); return cb(e);
@ -540,6 +542,7 @@ class EmbarkController {
engine.registerModuleGroup("filewatcher"); engine.registerModuleGroup("filewatcher");
engine.registerModuleGroup("storage"); engine.registerModuleGroup("storage");
engine.registerModuleGroup("communication"); engine.registerModuleGroup("communication");
engine.registerModuleGroup("namesystem");
engine.registerModulePackage('embark-deploy-tracker', {plugins: engine.plugins}); engine.registerModulePackage('embark-deploy-tracker', {plugins: engine.plugins});
engine.registerModulePackage('embark-plugin-cmd', {embarkConfigFile: engine.embarkConfig, embarkConfig: engine.config.embarkConfig, packageFile: 'package.json'}); engine.registerModulePackage('embark-plugin-cmd', {embarkConfigFile: engine.embarkConfig, embarkConfig: engine.config.embarkConfig, packageFile: 'package.json'});
callback(); callback();
@ -556,7 +559,8 @@ class EmbarkController {
try { try {
await Promise.all([ await Promise.all([
engine.events.request2("storage:node:start", engine.config.storageConfig), engine.events.request2("storage:node:start", engine.config.storageConfig),
engine.events.request2("communication:node:start", engine.config.communicationConfig) engine.events.request2("communication:node:start", engine.config.communicationConfig),
engine.events.request2("namesystem:node:start", engine.config.namesystemConfig)
]); ]);
} catch (e) { } catch (e) {
return cb(e); return cb(e);