models.task module¶
-
class
models.task.
Task
(attributes=None, end_time_seconds=None, error_message=None, events=None, expected_end_time_seconds=None, expected_seconds_remaining=None, expected_total_work_count=None, last_update_time_seconds=None, percent_finished=None, start_time_seconds=None, status=None, sub_tasks=None, task_path=None)[source]¶ Bases:
object
Implementation of the ‘Task’ model.
Specifies one task.
- Attributes:
- attributes (list of TaskAttribute): The latest attributes reported for
this task.
end_time_seconds (long|int): Specifies the end time of the task. error_message (string): Specifies an optional error message for this
task.
- events (list of TaskEvent): Specifies the events reported for this
task.
- expected_end_time_seconds (long|int): Specifies the estimated end time
of the task.
- expected_seconds_remaining (long|int): Specifies the expected
remaining time for this task in seconds.
- expected_total_work_count (long|int): The expected raw count of the
total work remaining. This is the highest work count value reported by the client. This field can be set to let pulse compute percentFinished by looking at the currently reported remainingWorkCount and the expectedTotalWorkCount.
- last_update_time_seconds (long|int): Specifies the timestamp when the
last progress was reported.
- percent_finished (float): Specifies the reported progress on the
task.
start_time_seconds (long|int): Specifies the start time of the task. status (StatusTaskEnum): Specifies the status of the task being
queried. ‘kActive’ indicates that the task is still active. ‘kFinished’ indicates that the task has finished without any errors. ‘kFinishedWithError’ indicates that the task has finished, but that there was an errror of some kind. ‘kCancelled’ indicates that the task was cancelled. ‘kFinishedGarbageCollected’ inidcates that the task was garbage collected due to its subtasks not finishing within the allotted time.
- sub_tasks (list of object): Specifies a list of subtasks belonging to
this task.
task_path (string): Specifes the path of this task.
-
classmethod
from_dictionary
(dictionary)[source]¶ Creates an instance of this model from a dictionary
- Args:
dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.
- Returns:
object: An instance of this structure class.