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

try/except

parent 1156f578
No related branches found
No related tags found
No related merge requests found
......@@ -356,7 +356,10 @@ class Scheduler:
# 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)
try:
update_subtasks_start_times_for_scheduling_unit(unit, lower_bound)
except Exception as e:
logger.warning("update_subtasks_start_times_for_scheduling_unit: %s", str(e))
# any units left to be scheduled? If so, loop again, else break out of while loop
if not get_dynamically_schedulable_scheduling_units().exists():
......@@ -371,11 +374,14 @@ class Scheduler:
# so they are ignored next time.
# It's up to the user/operator to tweak their constraints which makes them schedulable again, for a next try.
for su in get_dynamically_schedulable_scheduling_units().all():
determine_unschedulable_reason_and_mark_unschedulable_if_needed(su, datetime.utcnow(),
su.latest_possible_cycle_start_time,
proposed_start_time=None,
gridder=self.search_gridder,
raise_if_interruped=self._raise_if_triggered)
try:
determine_unschedulable_reason_and_mark_unschedulable_if_needed(su, datetime.utcnow(),
su.latest_possible_cycle_start_time,
proposed_start_time=None,
gridder=self.search_gridder,
raise_if_interruped=self._raise_if_triggered)
except Exception as e:
logger.warning("determine_unschedulable_reason_and_mark_unschedulable_if_needed: %s", str(e))
return scheduled_units
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment