From 01e84cdfe9305a4b3f5360a750bcff390ddd928f Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Tue, 10 Sep 2024 16:23:32 -0400 Subject: [PATCH] Include the job's timeout settings This will let a user know what the timeout setting was for the job, which is especially helpful if the execution was related to the timeout. --- src/noteburst/handlers/v1/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/noteburst/handlers/v1/models.py b/src/noteburst/handlers/v1/models.py index 5bbdd89..c686f67 100644 --- a/src/noteburst/handlers/v1/models.py +++ b/src/noteburst/handlers/v1/models.py @@ -161,6 +161,15 @@ class NotebookResponse(BaseModel): ), ] = None + timeout: Annotated[ + float | None, + Field( + None, + title="The job's timeout in seconds", + description="This field is null if a timeout was not set.", + ), + ] = None + @classmethod async def from_job_metadata( cls, @@ -224,6 +233,7 @@ async def from_job_metadata( error=noteburst_error, ipynb=ipynb, ipynb_error=ipynb_error, + timeout=job.kwargs["timeout"].total_seconds(), )