This repository has been archived on 2025-10-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2021-06-06 20:25:14 +02:00

25 lines
505 B
JavaScript

// Relay the backtest message it when it comes in.
module.exports = done => {
let backtest;
return {
message: message => {
if(message.type === 'error') {
done(message.error);
}
if(message.backtest) {
done(null, message.backtest);
}
},
exit: status => {
if(status !== 0) {
if(backtest)
console.error('Child process died after finishing backtest');
else
done('Child process has died.');
}
}
}
}