aboutsummaryrefslogtreecommitdiff
path: root/tools/schedule.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/schedule.js')
-rw-r--r--tools/schedule.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/schedule.js b/tools/schedule.js
index b18f5e8..f9604bf 100644
--- a/tools/schedule.js
+++ b/tools/schedule.js
@@ -93,7 +93,7 @@ exports.Queue = function(delayms, maxExport, call){
// Step 3: Then, pop job.normweight*num//1 elems from remaining, without num decrease or normweight recalc. But keep job.wacc = job.normweight*num%1
let efflen = num - dequeued.length;
- for (job of jobq){
+ for (let job of jobq){
let topop = job.wt*efflen/weightsum;
job.wacc += topop%1;
topop = topop-topop%1;
@@ -102,7 +102,7 @@ exports.Queue = function(delayms, maxExport, call){
}
// Step 4: Shallow copy job array, and sort by job.wacc.
- for (job of jobq.slice().sort((el, ne) => el.wacc-ne.wacc)){
+ for (let job of jobq.slice().sort((el, ne) => el.wacc-ne.wacc)){
// Step 5: Iterate through array (high->low), and subtract 1 until the length of output is num.
if (dequeued.length == num || job.data.length == 0) break;
job.wacc--;