diff --git a/SAS/TMSS/backend/services/scheduling/lib/dynamic_scheduling.py b/SAS/TMSS/backend/services/scheduling/lib/dynamic_scheduling.py index c46aa94ae6707331796c3f2cd551bb183ecf5a11..545661e70b24c868fc861fa1dc971e40d7601b11 100644 --- a/SAS/TMSS/backend/services/scheduling/lib/dynamic_scheduling.py +++ b/SAS/TMSS/backend/services/scheduling/lib/dynamic_scheduling.py @@ -351,6 +351,11 @@ class Scheduler: # just advance lower_bound += timedelta(hours=3) + # for nice "visual" feedback to the user, move each "old" schedulable unit to the lower_bound + # this also indicates to the user that the unit has been considered for times < lower_bound, and they could not be scheduled there. + for unit in get_dynamically_schedulable_scheduling_units().filter(scheduled_start_time__lt=lower_bound).all(): + update_subtasks_start_times_for_scheduling_unit(unit, lower_bound) + # any units left to be scheduled? If so, loop again, else break out of while loop if not get_dynamically_schedulable_scheduling_units().exists(): # there are no more schedulable units. check to-be-re-evaluated scheduled future units.