From 715705c89376c90202d499afe9e345c6b8a8fa79 Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Thu, 2 Apr 2026 16:43:45 +0100 Subject: [PATCH] refactor: Fix types of JobSpec.timeout_mins, JobSpec.timeout_secs This is set from Deploy.get_timeout_mins, which returns a float (probably the right type for this: "time out after 2.5 minutes" seems like a reasonable thing to say). Signed-off-by: Rupert Swarbrick --- src/dvsim/job/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dvsim/job/data.py b/src/dvsim/job/data.py index d820738c..8a76438e 100644 --- a/src/dvsim/job/data.py +++ b/src/dvsim/job/data.py @@ -80,7 +80,7 @@ class JobSpec(BaseModel): """Wait for dependent jobs to pass before scheduling.""" weight: int """Weight to apply to the scheduling priority.""" - timeout_mins: int | None + timeout_mins: float | None """Timeout to apply to the launched job.""" cmd: str @@ -124,7 +124,7 @@ def id(self) -> str: return self.full_name @property - def timeout_secs(self) -> int | None: + def timeout_secs(self) -> float | None: """Returns the timeout applied to the launched job, in seconds.""" return None if self.timeout_mins is None else self.timeout_mins * 60