From b0550bc91c8d2c084abda4c07438610b65b3a687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 29 Mar 2018 22:47:41 +0200 Subject: [PATCH] chg: Better name to check if the parsers are running --- bgpranking/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpranking/parser.py b/bgpranking/parser.py index 8e2f41b..dae8156 100644 --- a/bgpranking/parser.py +++ b/bgpranking/parser.py @@ -56,7 +56,7 @@ class RawFilesParser(): return self.extract_ipv4(f.getvalue()) def parse_raw_files(self): - set_running(self.source) + set_running('{}-{}'.format(self.__class__.__name__, self.source)) for filepath in self.files_to_parse: self.logger.debug('Parsing {}, {} to go.'.format(filepath, len(self.files_to_parse) - 1)) with open(filepath, 'rb') as f: @@ -69,7 +69,7 @@ class RawFilesParser(): p.sadd('intake', uuid) p.execute() self._archive(filepath) - unset_running(self.source) + unset_running('{}-{}'.format(self.__class__.__name__, self.source)) def _archive(self, filepath: Path): '''After processing, move file to the archive directory'''