chg: Better name to check if the parsers are running

pull/12/head
Raphaël Vinot 2018-03-29 22:47:41 +02:00
parent ae6c5bc9c0
commit b0550bc91c
1 changed files with 2 additions and 2 deletions

View File

@ -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'''