OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """Task related attribute container definitions.""" | 2 """Task related attribute container definitions.""" |
3 | 3 |
4 from __future__ import unicode_literals | 4 from __future__ import unicode_literals |
5 | 5 |
6 import time | 6 import time |
7 import uuid | 7 import uuid |
8 | 8 |
9 from plaso.containers import interface | 9 from plaso.containers import interface |
10 from plaso.containers import manager | 10 from plaso.containers import manager |
11 from plaso.lib import definitions | 11 from plaso.lib import definitions |
12 | 12 |
13 | 13 |
14 class Task(interface.AttributeContainer): | 14 class Task(interface.AttributeContainer): |
15 """Task attribute container. | 15 """Task attribute container. |
16 | 16 |
17 A task describes a piece of work for a multi processing worker process | 17 A task describes a piece of work for a multi processing worker process |
18 e.g. to process a path specification or to analyze an event. | 18 e.g. to process a path specification or to analyze an event. |
19 | 19 |
20 Attributes: | 20 Attributes: |
21 aborted (bool): True if the session was aborted. | 21 aborted (bool): True if the session was aborted. |
22 completion_time (int): time that the task was completed. Contains the | 22 completion_time (int): time that the task was completed. Contains the |
23 number of micro seconds since January 1, 1970, 00:00:00 UTC. | 23 number of micro seconds since January 1, 1970, 00:00:00 UTC. |
24 file_entry_type (str): dfVFS type of the file entry the path specification | 24 file_entry_type (str): dfVFS type of the file entry the path specification |
25 is referencing. | 25 is referencing. |
26 has_retry (bool): True if the task was previously abandoned and a retry | 26 has_retry (bool): True if the task was previously abandoned and a retry |
27 task was created, False otherwise. | 27 task was created, False otherwise. |
28 identifier (str): unique identifier of the task. | 28 identifier (str): unique identifier of the task. |
29 last_processing_time (int): the last time the task was marked as being | 29 last_processing_time (int): the last time the task was marked as being |
30 processed as number of milliseconds since January 1, 1970, 00:00:00 UTC. | 30 processed as number of milliseconds since January 1, 1970, 00:00:00 UTC. |
31 merge_priority (int): priority used for the task storage file merge, where | 31 merge_priority (int): priority used for the task storage file merge, where |
32 a lower value indicates a higher priority to merge. | 32 a lower value indicates a higher priority to merge. |
33 path_spec (dfvfs.PathSpec): path specification. | 33 path_spec (dfvfs.PathSpec): path specification. |
34 session_identifier (str): the identifier of the session the task is part of. | 34 session_identifier (str): the identifier of the session the task is part of. |
35 start_time (int): time that the task was started. Contains the number | 35 start_time (int): time that the task was started. Contains the number |
36 of micro seconds since January 1, 1970, 00:00:00 UTC. | 36 of micro seconds since January 1, 1970, 00:00:00 UTC. |
37 storage_file_size (int): size of the storage file in bytes. | 37 storage_file_size (int): size of the storage file in bytes. |
38 """ | 38 """ |
39 CONTAINER_TYPE = 'task' | 39 CONTAINER_TYPE = 'task' |
40 | 40 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 is part of. | 176 is part of. |
177 """ | 177 """ |
178 super(TaskStart, self).__init__() | 178 super(TaskStart, self).__init__() |
179 self.identifier = identifier | 179 self.identifier = identifier |
180 self.session_identifier = session_identifier | 180 self.session_identifier = session_identifier |
181 self.timestamp = None | 181 self.timestamp = None |
182 | 182 |
183 | 183 |
184 manager.AttributeContainersManager.RegisterAttributeContainers([ | 184 manager.AttributeContainersManager.RegisterAttributeContainers([ |
185 Task, TaskCompletion, TaskStart]) | 185 Task, TaskCompletion, TaskStart]) |
OLD | NEW |