fix: clean
This commit is contained in:
5
clean.js
5
clean.js
@@ -49,10 +49,10 @@ async function clean () {
|
|||||||
const rest = boughtAmountSum - releasedAmout;
|
const rest = boughtAmountSum - releasedAmout;
|
||||||
mylog.info('No. ', currentIndex, '用户' + userFund.userId, '剩余 ', rest);
|
mylog.info('No. ', currentIndex, '用户' + userFund.userId, '剩余 ', rest);
|
||||||
const vic = userFund.asset.vic || 0;
|
const vic = userFund.asset.vic || 0;
|
||||||
await Fund.findByIdAndUpdate(userFund.id, { vicFundSum: vic, 'asset.vic': 0, fundList: [], 'option.restNeetToRelease': rest, snapshot: { asset: userFund.asset } });
|
const newFund = vic + rest;
|
||||||
|
await Fund.findByIdAndUpdate(userFund.id, { vicFundSum: newFund, 'asset.vic': 0, 'asset.usdt': 0, fundList: [], snapshot: { asset: userFund.asset, fundList } });
|
||||||
probe.currentIndex = currentIndex;
|
probe.currentIndex = currentIndex;
|
||||||
}
|
}
|
||||||
process.exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const start = async (job, done) => {
|
const start = async (job, done) => {
|
||||||
@@ -83,6 +83,7 @@ const start = async (job, done) => {
|
|||||||
typeof process.send === 'function' && process.send('子进程开始执行mine');
|
typeof process.send === 'function' && process.send('子进程开始执行mine');
|
||||||
clean(job, done);
|
clean(job, done);
|
||||||
typeof process.send === 'function' && process.send('子进程mine执行完毕');
|
typeof process.send === 'function' && process.send('子进程mine执行完毕');
|
||||||
|
process.exit();
|
||||||
};
|
};
|
||||||
|
|
||||||
start();
|
start();
|
||||||
|
|||||||
Reference in New Issue
Block a user