TaskResultService#
- class TaskResultService[source]#
- get_all(*, offset=0, limit=50, extra_parameters=None)[source]#
Get all active tasks, all tasks that have not yet been started, a page of finished tasks, and the total number of finished tasks.
- Parameters:
offset (
int
) – First finished task to get.limit (
int
) – Amount of finished tasks to get.extra_parameters (
Optional
[Mapping
[str
,Union
[str
,bool
,int
,float
]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.self (TaskResultService[AuthenticatedClient]) –
- Returns:
The requested tasks, with the given limits applied to the finished jobs.
- Return type:
- get(*, task_result_id, extra_parameters=None)[source]#
Get the state of a task result.
To check if the task failed you should use the state attribute of the returned object as the status code of the response will still be 200. It is 200 as we successfully fulfilled the request, which was getting the task result.
- Parameters:
- Returns:
The retrieved task result.
- Return type:
- restart(*, task_result_id, extra_parameters=None)[source]#
Restart a task result.
The restarted task must not be in the not_started, started, or finished state.
- Parameters:
- Returns:
Nothing.
- Return type:
None