chg: Remove stats for archived captures

pull/860/head
Raphaël Vinot 2024-01-05 16:42:47 +01:00
parent 01f16c4e28
commit 858bff544a
1 changed files with 1 additions and 14 deletions
lookyloo

View File

@ -1430,20 +1430,7 @@ class Lookyloo():
stats: Dict[int, Dict[int, Dict[str, Any]]] = {}
weeks_stats: Dict[int, Dict] = {}
# Load the archived captures from redis
archived: List[CaptureCache] = []
p = self.redis.pipeline()
for directory in self.redis.hvals('lookup_dirs_archived'):
p.hgetall(directory)
for cache in p.execute():
if not cache:
continue
try:
archived.append(CaptureCache(cache))
except LookylooException as e:
self.logger.warning(f'Unable load cache for {cache.get("uuid")} - {e}.')
for cache in self.sorted_capture_cache() + archived:
for cache in self.sorted_capture_cache():
if not hasattr(cache, 'timestamp'):
continue
date_submission: datetime = cache.timestamp