fixed top priority tests and start with correct device

This commit is contained in:
2026-07-27 14:52:39 -04:00
parent d4b974617c
commit 0e7f55ed8b
3 changed files with 14 additions and 15 deletions
+7
View File
@@ -104,6 +104,13 @@ class Scheduler:
elif bundle.device == REF:
pending_ref.append(bundle)
# If there is priority 0 bundle in REF bundle, device should be REF for the first window, otherwise DUT
if any(bundle.priority == 0 for bundle in pending_ref):
night_window_device = REF
# If there is priority 1 bundle in REF but not in DUT, device should be REF for the first window, otherwise DUT
elif any(bundle.priority == 1 for bundle in pending_ref) and not any(bundle.priority == 1 for bundle in pending_dut):
night_window_device = REF
while pending_dut or pending_ref:
daytime_window_active = daytime_window_pending and not is_off_day(cursor_date, self.holiday_dates)
window_device = self.daytime_testing_device if daytime_window_active else night_window_device