From 02bd4f6fdbd5fa44f429e88bbee7e73121834dce Mon Sep 17 00:00:00 2001 From: Sukrit Kalra Date: Mon, 25 Mar 2024 23:15:10 -0700 Subject: [PATCH] Use task deadlines only when a plan ahead is not provided. --- schedulers/tetrisched_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schedulers/tetrisched_scheduler.py b/schedulers/tetrisched_scheduler.py index 700b4297..a2e7018b 100644 --- a/schedulers/tetrisched_scheduler.py +++ b/schedulers/tetrisched_scheduler.py @@ -413,7 +413,7 @@ def _get_plan_ahead_this_cycle( `EventTime`: The plan-ahead for this scheduling cycle. """ plan_ahead_this_cycle = None - if self.enforce_deadlines: + if self.enforce_deadlines and self._plan_ahead.is_invalid(): plan_ahead_this_cycle = max(task.deadline for task in tasks) else: if self._plan_ahead.is_invalid():