OLD | NEW |
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 """The event extraction worker.""" | 2 """The event extraction worker.""" |
3 | 3 |
4 from __future__ import unicode_literals | 4 from __future__ import unicode_literals |
5 | 5 |
6 import copy | 6 import copy |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import re | 9 import re |
10 import time | 10 import time |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 """Processes a metadata file. | 700 """Processes a metadata file. |
701 | 701 |
702 Args: | 702 Args: |
703 mediator (ParserMediator): mediates the interactions between | 703 mediator (ParserMediator): mediates the interactions between |
704 parsers and other components, such as storage and abort signals. | 704 parsers and other components, such as storage and abort signals. |
705 file_entry (dfvfs.FileEntry): file entry of the metadata file. | 705 file_entry (dfvfs.FileEntry): file entry of the metadata file. |
706 """ | 706 """ |
707 self.processing_status = definitions.PROCESSING_STATUS_EXTRACTING | 707 self.processing_status = definitions.PROCESSING_STATUS_EXTRACTING |
708 | 708 |
709 self._event_extractor.ParseFileEntryMetadata(mediator, file_entry) | 709 self._event_extractor.ParseFileEntryMetadata(mediator, file_entry) |
710 self._event_extractor.ParseMetadataFile(mediator, file_entry, '') | 710 for data_stream in file_entry.data_streams: |
| 711 if self._abort: |
| 712 break |
| 713 self.last_activity_timestamp = time.time() |
711 | 714 |
712 self.last_activity_timestamp = time.time() | 715 self._event_extractor.ParseMetadataFile( |
| 716 mediator, file_entry, data_stream.name) |
713 | 717 |
714 def _SetHashers(self, hasher_names_string): | 718 def _SetHashers(self, hasher_names_string): |
715 """Sets the hasher names. | 719 """Sets the hasher names. |
716 | 720 |
717 Args: | 721 Args: |
718 hasher_names_string (str): comma separated names of the hashers | 722 hasher_names_string (str): comma separated names of the hashers |
719 to enable, where 'none' disables the hashing analyzer. | 723 to enable, where 'none' disables the hashing analyzer. |
720 """ | 724 """ |
721 if not hasher_names_string or hasher_names_string == 'none': | 725 if not hasher_names_string or hasher_names_string == 'none': |
722 return | 726 return |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 """Sets the parsers profiler. | 812 """Sets the parsers profiler. |
809 | 813 |
810 Args: | 814 Args: |
811 processing_profiler (ProcessingProfiler): processing profile. | 815 processing_profiler (ProcessingProfiler): processing profile. |
812 """ | 816 """ |
813 self._processing_profiler = processing_profiler | 817 self._processing_profiler = processing_profiler |
814 | 818 |
815 def SignalAbort(self): | 819 def SignalAbort(self): |
816 """Signals the extraction worker to abort.""" | 820 """Signals the extraction worker to abort.""" |
817 self._abort = True | 821 self._abort = True |
OLD | NEW |