diff --git a/src/dvsim/job/data.py b/src/dvsim/job/data.py index d820738c..7537fe59 100644 --- a/src/dvsim/job/data.py +++ b/src/dvsim/job/data.py @@ -9,6 +9,7 @@ capture the results of the job run. """ +import math from collections.abc import Callable, Mapping, Sequence from pathlib import Path @@ -80,7 +81,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 @@ -126,7 +127,7 @@ def id(self) -> str: @property def timeout_secs(self) -> int | None: """Returns the timeout applied to the launched job, in seconds.""" - return None if self.timeout_mins is None else self.timeout_mins * 60 + return None if self.timeout_mins is None else math.floor(self.timeout_mins * 60) class JobStatusInfo(BaseModel):