Skip to content

Commit

Permalink
Include the job's timeout settings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonathansick committed Sep 10, 2024
1 parent a620299 commit 01e84cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/noteburst/handlers/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -224,6 +233,7 @@ async def from_job_metadata(
error=noteburst_error,
ipynb=ipynb,
ipynb_error=ipynb_error,
timeout=job.kwargs["timeout"].total_seconds(),
)


Expand Down

0 comments on commit 01e84cd

Please sign in to comment.