Skip to content

Commit

Permalink
chg: force rebuild pickle on indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Feb 2, 2025
1 parent 67a523d commit 103070c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lookyloo/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from redis.connection import UnixDomainSocketConnection

from .exceptions import NoValidHarFile, TreeNeedsRebuild
from .helpers import load_pickle_tree
from .helpers import load_pickle_tree, remove_pickle_tree
from .default import get_socket_path, get_config


Expand Down Expand Up @@ -173,7 +173,8 @@ def index_capture(self, uuid_to_index: str, directory: Path) -> None:
except (TreeNeedsRebuild, NoValidHarFile) as e:
self.logger.warning(f'Error loading the pickle for {uuid_to_index}: {e}')
except Exception as e:
self.logger.exception(f'Error during indexing for {uuid_to_index}: {e}')
self.logger.error(f'Error during indexing for {uuid_to_index}, recreate pickle: {e}')
remove_pickle_tree(directory)
finally:
self.indexing_done(uuid_to_index)

Expand Down

0 comments on commit 103070c

Please sign in to comment.