Skip to content

Commit

Permalink
fixed mistake where wasted resources for resource type not required b…
Browse files Browse the repository at this point in the history
…y job is calculated
  • Loading branch information
eileen-kuehn committed Apr 8, 2019
1 parent eb10504 commit 37b4377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lapis/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _schedule_job(self, job) -> Drone:
if resource_type not in drone.resources.keys():
cost = float("Inf")
elif resource_type not in job.resources:
cost += drone.resources[resource_type] - drone.resources[resource_type]
cost += drone.pool_resources[resource_type] - drone.resources[resource_type]
elif (drone.pool_resources[resource_type] - drone.resources[resource_type]) < \
job.resources[resource_type]:
cost = float("Inf")
Expand Down

0 comments on commit 37b4377

Please sign in to comment.