mirror of https://github.com/CIRCL/lookyloo
chg: Remove stats for archived captures
parent
01f16c4e28
commit
858bff544a
|
@ -1430,20 +1430,7 @@ class Lookyloo():
|
||||||
stats: Dict[int, Dict[int, Dict[str, Any]]] = {}
|
stats: Dict[int, Dict[int, Dict[str, Any]]] = {}
|
||||||
weeks_stats: Dict[int, Dict] = {}
|
weeks_stats: Dict[int, Dict] = {}
|
||||||
|
|
||||||
# Load the archived captures from redis
|
for cache in self.sorted_capture_cache():
|
||||||
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:
|
|
||||||
if not hasattr(cache, 'timestamp'):
|
if not hasattr(cache, 'timestamp'):
|
||||||
continue
|
continue
|
||||||
date_submission: datetime = cache.timestamp
|
date_submission: datetime = cache.timestamp
|
||||||
|
|
Loading…
Reference in New Issue