TaskResultService#

class TaskResultService[source]#

Methods

get_all

Get all active tasks, all tasks that have not yet been started, a page of finished tasks, and the total number of finished tasks.

get

Get the state of a task result.

restart

Restart a task result.

revoke

Revoke a task result.

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:
Returns:

The requested tasks, with the given limits applied to the finished jobs.

Return type:

ResultDataGetTaskResultGetAll

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:

Job

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

revoke(*, task_result_id, extra_parameters=None)[source]#

Revoke a task result.

The revoked task must be in the “not_started” state.

Parameters:
Returns:

Nothing.

Return type:

None