chg: Better name to check if the parsers are running
parent
ae6c5bc9c0
commit
b0550bc91c
|
@ -56,7 +56,7 @@ class RawFilesParser():
|
||||||
return self.extract_ipv4(f.getvalue())
|
return self.extract_ipv4(f.getvalue())
|
||||||
|
|
||||||
def parse_raw_files(self):
|
def parse_raw_files(self):
|
||||||
set_running(self.source)
|
set_running('{}-{}'.format(self.__class__.__name__, self.source))
|
||||||
for filepath in self.files_to_parse:
|
for filepath in self.files_to_parse:
|
||||||
self.logger.debug('Parsing {}, {} to go.'.format(filepath, len(self.files_to_parse) - 1))
|
self.logger.debug('Parsing {}, {} to go.'.format(filepath, len(self.files_to_parse) - 1))
|
||||||
with open(filepath, 'rb') as f:
|
with open(filepath, 'rb') as f:
|
||||||
|
@ -69,7 +69,7 @@ class RawFilesParser():
|
||||||
p.sadd('intake', uuid)
|
p.sadd('intake', uuid)
|
||||||
p.execute()
|
p.execute()
|
||||||
self._archive(filepath)
|
self._archive(filepath)
|
||||||
unset_running(self.source)
|
unset_running('{}-{}'.format(self.__class__.__name__, self.source))
|
||||||
|
|
||||||
def _archive(self, filepath: Path):
|
def _archive(self, filepath: Path):
|
||||||
'''After processing, move file to the archive directory'''
|
'''After processing, move file to the archive directory'''
|
||||||
|
|
Loading…
Reference in New Issue