diff options
Diffstat (limited to 'release/io/netrender/balancing.py')
-rw-r--r-- | release/io/netrender/balancing.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/release/io/netrender/balancing.py b/release/io/netrender/balancing.py index c167594e1c5..372ea7d95b7 100644 --- a/release/io/netrender/balancing.py +++ b/release/io/netrender/balancing.py @@ -64,7 +64,13 @@ class Balancer: class RatingCredit(RatingRule): def rate(self, job): - return -job.credits * job.priority # more credit is better (sort at first in list) + # more credit is better (sort at first in list) + return -job.credits * job.priority + +class RatingUsage(RatingRule): + def rate(self, job): + # less usage is better + return job.usage / job.priority class NewJobPriority(PriorityRule): def __init__(self, limit = 1): |