lot/app/predict.js
2022-05-12 16:33:35 +01:00

32 lines
640 B
JavaScript

const loader = require('../libs/loader');
const lot = require('../libs/lot');
const lotv2 = require('../libs/lotV2');
const pusher = require('../libs/pusher');
const log4js = require('log4js');
const logger = log4js.getLogger();
logger.level = 'debug';
function run(data) {
const v1 = lot.calculate(data);
const v2 = lotv2.calculate(data);
const msg = `V2: ${v2} stars: ${v1.mainstars}
V1: ${v1.mainline} stars: ${v1.mainstars}
Other: ${v1.otherLine} stars: ${v1.otherStars}
`;
pusher.push(msg);
logger.debug(msg);
// loader.save(data);
}
function go() {
logger.info('GO!');
loader.load(run);
}
(() => {
go();
})();