Fixed image server sorting, fixed improper imstat job counts

This commit is contained in:
Essem 2022-01-05 10:17:59 -06:00
parent a9a404d1e1
commit 6d1bc63352
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ class ImageWorker extends BaseServiceWorker {
async chooseServer(ideal) {
if (ideal.length === 0) throw "No available servers";
const sorted = ideal.sort((a, b) => {
return b.load - a.load;
return a.load - b.load;
}).filter((e, i, array) => {
return !(e.load < array[0].load);
});