Skip to content

Commit 63fc3ba

Browse files
authored
Merge pull request #20 from taskbadger/sk/mins-to-secs
update schema with changes from API
2 parents ead7be9 + cf36b28 commit 63fc3ba

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

taskbadger.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ components:
728728
minimum: 1
729729
nullable: true
730730
description: Maximum time to allow between task updates before considering
731-
the task stale. (seconds)
731+
the task stale. Only applies when task is in a running state. (seconds)
732732
StatusEnum:
733733
enum:
734734
- pending
@@ -825,7 +825,7 @@ components:
825825
minimum: 1
826826
nullable: true
827827
description: Maximum time to allow between task updates before considering
828-
the task stale. (seconds)
828+
the task stale. Only applies when task is in a running state. (seconds)
829829
url:
830830
type: string
831831
readOnly: true
@@ -906,7 +906,7 @@ components:
906906
minimum: 1
907907
nullable: true
908908
description: Maximum time to allow between task updates before considering
909-
the task stale. (seconds)
909+
the task stale. Only applies when task is in a running state. (seconds)
910910
required:
911911
- name
912912
securitySchemes:

taskbadger/internal/models/patched_task_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class PatchedTaskRequest:
3030
max_runtime (Union[Unset, None, int]): Maximum duration the task can be running for before being considered
3131
failed. (seconds)
3232
stale_timeout (Union[Unset, None, int]): Maximum time to allow between task updates before considering the task
33-
stale. (seconds)
33+
stale. Only applies when task is in a running state. (seconds)
3434
"""
3535

3636
name: Union[Unset, str] = UNSET

taskbadger/internal/models/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Task:
3838
max_runtime (Union[Unset, None, int]): Maximum duration the task can be running for before being considered
3939
failed. (seconds)
4040
stale_timeout (Union[Unset, None, int]): Maximum time to allow between task updates before considering the task
41-
stale. (seconds)
41+
stale. Only applies when task is in a running state. (seconds)
4242
"""
4343

4444
id: str

taskbadger/internal/models/task_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class TaskRequest:
3030
max_runtime (Union[Unset, None, int]): Maximum duration the task can be running for before being considered
3131
failed. (seconds)
3232
stale_timeout (Union[Unset, None, int]): Maximum time to allow between task updates before considering the task
33-
stale. (seconds)
33+
stale. Only applies when task is in a running state. (seconds)
3434
"""
3535

3636
name: str

taskbadger/sdk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ def create_task(
7878
value: The current 'value' of the task.
7979
value_max: The maximum value the task is expected to achieve.
8080
data: Custom task data.
81-
max_runtime: Maximum expected runtime (minutes).
82-
stale_timeout: Maximum allowed time between updates (minutes).
81+
max_runtime: Maximum expected runtime (seconds).
82+
stale_timeout: Maximum allowed time between updates (seconds).
8383
actions: Task actions.
8484
monitor_id: ID of the monitor to associate this task with.
8585
@@ -128,8 +128,8 @@ def update_task(
128128
value: The current 'value' of the task.
129129
value_max: The maximum value the task is expected to achieve.
130130
data: Custom task data.
131-
max_runtime: Maximum expected runtime (minutes).
132-
stale_timeout: Maximum allowed time between updates (minutes).
131+
max_runtime: Maximum expected runtime (seconds).
132+
stale_timeout: Maximum allowed time between updates (seconds).
133133
actions: Task actions.
134134
135135
Returns:

0 commit comments

Comments
 (0)