begin migrating search backends to new plugin system

This commit is contained in:
Nick Sweeting 2024-09-24 02:13:01 -07:00
parent 2d19317e3f
commit c9c163efed
No known key found for this signature in database
11 changed files with 83 additions and 21 deletions

View file

@ -141,8 +141,6 @@ from .logging_util import (
printable_dependency_version,
)
from .search import flush_search_index, index_links
@enforce_types
def help(out_dir: Path=OUTPUT_DIR) -> None:
@ -767,6 +765,8 @@ def remove(filter_str: Optional[str]=None,
to_remove = snapshots.count()
from .search import flush_search_index
flush_search_index(snapshots=snapshots)
remove_from_sql_main_index(snapshots=snapshots, out_dir=out_dir)
all_snapshots = load_main_index(out_dir=out_dir)
@ -790,6 +790,7 @@ def update(resume: Optional[float]=None,
"""Import any new links from subscriptions and retry any previously failed/skipped links"""
from core.models import ArchiveResult
from .search import index_links
check_data_folder(out_dir=out_dir)
check_dependencies()