better dependency checking system and guards

This commit is contained in:
Nick Sweeting 2019-04-11 03:42:35 -04:00
parent fafe6e75c5
commit 718e25c973
4 changed files with 271 additions and 108 deletions

View file

@ -14,6 +14,7 @@ from .archive_methods import archive_link
from .config import (
ONLY_NEW,
OUTPUT_DIR,
check_dependencies,
)
from .logs import (
log_archiving_started,
@ -26,6 +27,8 @@ from .logs import (
def update_archive_data(import_path: Optional[str]=None, resume: Optional[float]=None, only_new: bool=False) -> List[Link]:
"""The main ArchiveBox entrancepoint. Everything starts here."""
check_dependencies()
# Step 1: Load list of links from the existing index
# merge in and dedupe new links from import_path
all_links, new_links = load_links_index(out_dir=OUTPUT_DIR, import_path=import_path)