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

for nice visual feedback to the user, move each old schedulable unit to the lower_bound

parent cf165475
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment