Skip to content
Snippets Groups Projects
Commit 763e9b01 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-2227: mark the B-prio schedulable units as not placed yet

parent 95fb7924
Branches
Tags
No related merge requests found
...@@ -287,7 +287,12 @@ class Scheduler: ...@@ -287,7 +287,12 @@ class Scheduler:
if scheduled_unit: if scheduled_unit:
scheduled_units.append(scheduled_unit) scheduled_units.append(scheduled_unit)
# can we fit any B-prio units in the new gap(s) in the schedule? # mark the B-prio schedulable units as not placed yet....
for scheduling_unit in get_dynamically_schedulable_scheduling_units(priority_queue=models.PriorityQueueType.objects.get(value=models.PriorityQueueType.Choices.B.value)).filter(placed=True):
scheduling_unit.placed = False
scheduling_unit.save()
# ... and see if we can fit any B-prio units in the new gap(s) in the schedule?
scheduled_B_units = self.place_B_priority_units_in_gaps_around_scheduling_unit(scheduled_unit, do_schedule=True) scheduled_B_units = self.place_B_priority_units_in_gaps_around_scheduling_unit(scheduled_unit, do_schedule=True)
scheduled_units.extend(scheduled_B_units) scheduled_units.extend(scheduled_B_units)
...@@ -568,6 +573,7 @@ class Scheduler: ...@@ -568,6 +573,7 @@ class Scheduler:
# mark the schedulable units that they are not 'placed' yet by the scheduler. # mark the schedulable units that they are not 'placed' yet by the scheduler.
for scheduling_unit in get_dynamically_schedulable_scheduling_units(): for scheduling_unit in get_dynamically_schedulable_scheduling_units():
if scheduling_unit.placed:
scheduling_unit.placed = False scheduling_unit.placed = False
scheduling_unit.save() scheduling_unit.save()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment