diff options
| author | mjkwiatkowski <mati.rewa@gmail.com> | 2026-06-26 13:33:10 +0200 |
|---|---|---|
| committer | mjkwiatkowski <mati.rewa@gmail.com> | 2026-06-26 13:33:10 +0200 |
| commit | 00945a67f551b90c528438bd24b6573abe603050 (patch) | |
| tree | b43025d097a9c70191f570720d993b24a8fcb00b /opendc-compute | |
| parent | 15a3d5c6f55bec4a39f81f127dd1feec9660ecdc (diff) | |
Diffstat (limited to 'opendc-compute')
| -rw-r--r-- | opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt index 42b652a7..237344f2 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt @@ -68,6 +68,7 @@ public class SmartScheduler : ComputeScheduler { override fun select(iter: MutableIterator<SchedulingRequest>): SchedulingResult { client?.checkForInsights() + var unluckyHost = listOf("") if (numHosts == 0) { return SchedulingResult(SchedulingResultType.FAILURE) @@ -94,6 +95,11 @@ public class SmartScheduler : ComputeScheduler { for (chosenListIndex in minAvailableHost until hostsQueue.size) { chosenList = hostsQueue[chosenListIndex] for (host in chosenList) { + if(unluckyHost.isNotEmpty()){ + if(host.host.getName() in unluckyHost){ + continue + } + } // Here be filtering, but for now we remove it completely. iter.remove() chosenHost = host |
