mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-10 05:56:00 +00:00
update to fix tests
This commit is contained in:
parent
062de6b4fb
commit
a706dd0638
@ -8,29 +8,25 @@ class ProcessManager {
|
||||
this.processes = {};
|
||||
|
||||
self.events.setCommandHandler('processes:register', (name, cb) => {
|
||||
console.dir("=====> registering " + name);
|
||||
this.processes[name] = {
|
||||
state: 'unstarted',
|
||||
cb: cb
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
self.events.setCommandHandler('processes:launch', (name, cb) => {
|
||||
let process = self.processes[name];
|
||||
// TODO: should make distinction between starting and running
|
||||
if (process.state != 'unstarted') {
|
||||
console.dir("=====> already started " + name);
|
||||
return cb();
|
||||
}
|
||||
console.dir("=====> launching " + name);
|
||||
process.state = 'starting';
|
||||
//let pry = require('pryjs');
|
||||
//eval(pry.it);
|
||||
process.cb.apply(process.cb, [() => {
|
||||
process.state = 'running';
|
||||
console.dir("=====> launched " + name);
|
||||
cb();
|
||||
}]);
|
||||
process.cb.apply(process.cb, [
|
||||
() => {
|
||||
process.state = 'running';
|
||||
cb();
|
||||
}
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user