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

@ -31,7 +31,6 @@ from ..logging_util import (
log_archive_method_started,
log_archive_method_finished,
)
from ..search import write_search_index
from .title import should_save_title, save_title
from .favicon import should_save_favicon, save_favicon
@ -110,6 +109,8 @@ def ignore_methods(to_ignore: List[str]) -> Iterable[str]:
def archive_link(link: Link, overwrite: bool=False, methods: Optional[Iterable[str]]=None, out_dir: Optional[Path]=None, created_by_id: int | None=None) -> Link:
"""download the DOM, PDF, and a screenshot into a folder named after the link's timestamp"""
from ..search import write_search_index
# TODO: Remove when the input is changed to be a snapshot. Suboptimal approach.
from core.models import Snapshot, ArchiveResult
try: