TaskResult¶
from inet.common.task
- class TaskResult(task=None, result='DONE', expected_result='DONE', reason=None, error_message=None, exception=None, store_complete_binary_hash=False, store_complete_source_hash=False, store_partial_binary_hash=False, store_partial_source_hash=False, elapsed_wall_time=None, possible_results=['DONE', 'SKIP', 'CANCEL', 'ERROR'], possible_result_colors=['\x1b[0;32m', '\x1b[0;36m', '\x1b[0;36m', '\x1b[1;31m'], **kwargs)[source]¶
Bases:
object
Represents a task result that is produced when a
Task
is run. The most important attributes of a task result are the result, reason and error_message.Initializes a new task result object.
- Parameters
task (
Task
) – The original task that was run when this task result was produced.result (string) – The result of the task execution. The value must be one of the values in the possible_results attribute.
expected_result (string) – The originally expected result of the task execution. The value must be one of the values in the possible_results attribute.
reason (string or None) – An optional human readable explanation for the task result.
error_message (string or None) – An optional error message that is most often extracted from an exception raised during the task execution.
exception (Exception) – An optional exception that was raised during the task execution.
store_complete_binary_hash (bool) – Requests storing the hash of the complete binary distribution that is needed to run the original task.
store_complete_source_hash (bool) – Requests storing the hash of the complete source distribution that is needed to run the original task.
store_partial_binary_hash (bool) – Requests storing the hash of the optimized partial binary distribution that is needed to run the original task.
store_partial_source_hash (bool) – Requests storing the hash of the optimized partial source distribution that is needed to run the original task.
elapsed_wall_time (number) – The elapsed time while the task was running.
possible_results (List of string) – The list of possible results with which the execution of the original task can end.
possible_result_colors (List of string) – The list of colors for the corresponding possible results.
Methods
Runs the original task again that created this task result.
Attributes
- rerun(**kwargs)[source]¶
Runs the original task again that created this task result.
- Returns (
TaskResult
): The task result.
- Returns (