mirror of https://github.com/CIRCL/lookyloo
fix: Put the max captures counter at the right place...
parent
fc5850e147
commit
f60457a484
|
@ -38,7 +38,6 @@ class BackgroundIndexer(AbstractManager):
|
||||||
# This value makes sure we break out of the loop and build pickles of the most recent captures
|
# This value makes sure we break out of the loop and build pickles of the most recent captures
|
||||||
max_captures = 50
|
max_captures = 50
|
||||||
for uuid_path in sorted(self.lookyloo.capture_dir.glob('**/uuid'), reverse=True):
|
for uuid_path in sorted(self.lookyloo.capture_dir.glob('**/uuid'), reverse=True):
|
||||||
max_captures -= 1
|
|
||||||
if ((uuid_path.parent / 'tree.pickle.gz').exists() or (uuid_path.parent / 'tree.pickle').exists()):
|
if ((uuid_path.parent / 'tree.pickle.gz').exists() or (uuid_path.parent / 'tree.pickle').exists()):
|
||||||
# We already have a pickle file
|
# We already have a pickle file
|
||||||
self.logger.debug(f'{uuid_path.parent} has a pickle.')
|
self.logger.debug(f'{uuid_path.parent} has a pickle.')
|
||||||
|
@ -53,6 +52,7 @@ class BackgroundIndexer(AbstractManager):
|
||||||
self.logger.info(f'{uuid_path.parent} is locked, pickle generated by another process.')
|
self.logger.info(f'{uuid_path.parent} is locked, pickle generated by another process.')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
max_captures -= 1
|
||||||
with uuid_path.open() as f:
|
with uuid_path.open() as f:
|
||||||
uuid = f.read()
|
uuid = f.read()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue