From ce76218657b15119469f9351547c76b31e0d0cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 16 Nov 2023 23:58:07 +0100 Subject: [PATCH] fix: build backlog pickles in reverse order --- bin/background_indexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/background_indexer.py b/bin/background_indexer.py index 3dcee5ce..24a9e6ef 100755 --- a/bin/background_indexer.py +++ b/bin/background_indexer.py @@ -45,7 +45,7 @@ class BackgroundIndexer(AbstractManager): archive_interval = timedelta(days=get_config('generic', 'archive')) cut_time = (datetime.now() - archive_interval) for month_dir in make_dirs_list(self.lookyloo.capture_dir): - for capture_time, path in get_sorted_captures_from_disk(month_dir, cut_time=cut_time, keep_more_recent=True): + for capture_time, path in sorted(get_sorted_captures_from_disk(month_dir, cut_time=cut_time, keep_more_recent=True), reverse=True): if ((path / 'tree.pickle.gz').exists() or (path / 'tree.pickle').exists()): # We already have a pickle file self.logger.debug(f'{path} has a pickle.')