diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-02-13 01:39:24 +0000 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-02-13 01:39:24 +0000 |
commit | 9770f779663ead9fad3ec79e3aff4becb1b44dee (patch) | |
tree | e068362f25f67eedc3d078b7b9342eedc45244ac /tools | |
parent | 2e5bd9ce80a6190d307daf2d59767e1e729e00d8 (diff) | |
parent | 442f49136ae11f6d8ed2a570423cbdae7f31a89b (diff) |
Merge branch 'master' of https://git.hrhr.dev/ywot-clean
Diffstat (limited to 'tools')
-rw-r--r-- | tools/schedule.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/schedule.js b/tools/schedule.js index d8509b8..b18f5e8 100644 --- a/tools/schedule.js +++ b/tools/schedule.js @@ -86,7 +86,7 @@ exports.Queue = function(delayms, maxExport, call){ // Step 2: Start at lowest, and pop all until job.data.length>job.normweight*num (decreasing num as popping and recalc job.normweight). Delete the job. let weightsum = jobq.map(job => job.wt).reduce((acc, cur)=>acc+cur); - while (jobq[0] && jobq[0].data.length<(jobq[0].wacc+jobq[0].wt*num/weightsum)){ + while (jobq[0] && jobq[0].data.length<(jobq[0].wt*num/weightsum)){ weightsum -= jobq[0].wt; dequeued.push(...jobq.shift().data); } |