Skip to content

Commit

Permalink
Merge branch 'main' into GSCHED-739
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEverett authored Sep 30, 2024
2 parents ff70e3e + a3765fb commit 8fa4350
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scheduler/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def _schedule(self,
raise RuntimeError(f'No morning twilight found for site {site_name} for night {night_idx}.')

if next_event_timeslot is None or current_timeslot >= next_event_timeslot:

if not events_by_night.has_more_events():
# Check if there are no more events so it won't enter the loop behind
break
# Stop if there are no more events.
while events_by_night.has_more_events():
top_event = events_by_night.top_event()
Expand Down

0 comments on commit 8fa4350

Please sign in to comment.