diff --git a/archivebox/cli/archivebox_init.py b/archivebox/cli/archivebox_init.py index bf67348d..542f8fa7 100755 --- a/archivebox/cli/archivebox_init.py +++ b/archivebox/cli/archivebox_init.py @@ -155,12 +155,12 @@ def init(force: bool = False, quick: bool = False, install: bool = False) -> Non CONSTANTS.PERSONAS_DIR.mkdir(parents=True, exist_ok=True) CONSTANTS.DEFAULT_TMP_DIR.mkdir(parents=True, exist_ok=True) - from archivebox.config.paths import get_or_create_working_tmp_dir, get_or_create_working_lib_dir + from archivebox.config.paths import create_and_chown_dir, get_or_create_working_tmp_dir, get_or_create_working_lib_dir config = get_config() - config.TMP_DIR.mkdir(parents=True, exist_ok=True) - config.ABXPKG_LIB_DIR.mkdir(parents=True, exist_ok=True) - (config.ABXPKG_LIB_DIR / "bin").mkdir(parents=True, exist_ok=True) + create_and_chown_dir(config.TMP_DIR) + create_and_chown_dir(config.ABXPKG_LIB_DIR) + create_and_chown_dir(config.ABXPKG_LIB_DIR / "bin") working_tmp_dir = get_or_create_working_tmp_dir(autofix=True, quiet=True) if working_tmp_dir: diff --git a/archivebox/progressmonitor/views.py b/archivebox/progressmonitor/views.py index 30753fbc..460360ab 100644 --- a/archivebox/progressmonitor/views.py +++ b/archivebox/progressmonitor/views.py @@ -636,6 +636,7 @@ def live_progress_view(request): active_snapshots_for_crawl = [] for snapshot in displayed_snapshots_by_crawl.get(crawl_id, []): snapshot_run_started_at = snapshot.get("downloaded_at") or snapshot.get("created_at") + snapshot_process_started_at = snapshot.get("created_at") # Get archive results only for displayed active snapshots. Large crawls can # contain thousands of sealed snapshots, and prefetching all their results # makes the progress endpoint compete with the runner. @@ -743,7 +744,7 @@ def live_progress_view(request): seen_plugin_keys.add(str(process.id) if process else f"{ar.plugin}:{hook_name}") for proc_payload, proc_started_at in process_records_by_snapshot.get(str(snapshot["id"]), []): - if not is_current_run_timestamp(proc_started_at, snapshot_run_started_at): + if not is_current_run_timestamp(proc_started_at, snapshot_process_started_at): continue proc_key = str(proc_payload.get("process_id") or f"{proc_payload.get('plugin')}:{proc_payload.get('hook_name')}") if proc_key in seen_plugin_keys: diff --git a/archivebox/tests/test_ui_live_progress.py b/archivebox/tests/test_ui_live_progress.py index cd6e03b3..e0914050 100644 --- a/archivebox/tests/test_ui_live_progress.py +++ b/archivebox/tests/test_ui_live_progress.py @@ -551,6 +551,7 @@ class TestLiveProgressView: process = real_second_snapshot_hook_process assert process.status == Process.StatusChoices.EXITED assert process.exit_code == 0 + type(snapshot).objects.filter(pk=snapshot.pk).update(downloaded_at=process.started_at + timezone.timedelta(seconds=1)) client.force_login(admin_user) response = client.get(reverse("live_progress"), HTTP_HOST=ADMIN_TEST_HOST) diff --git a/pyproject.toml b/pyproject.toml index ebe55f16..c61c1c06 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "archivebox" -version = "0.9.35rc150" +version = "0.9.35rc151" requires-python = ">=3.13" description = "Self-hosted internet archiving solution." authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}] @@ -347,7 +347,7 @@ Donate = "https://github.com/ArchiveBox/ArchiveBox/wiki/Donations" [tool.bumpver] -current_version = "v0.9.35rc150" +current_version = "v0.9.35rc151" version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]" commit_message = "bump version {old_version} -> {new_version}" tag_message = "{new_version}" diff --git a/uv.lock b/uv.lock index af4e2db6..3994bc47 100644 --- a/uv.lock +++ b/uv.lock @@ -123,7 +123,7 @@ wheels = [ [[package]] name = "archivebox" -version = "0.9.35rc150" +version = "0.9.35rc151" source = { editable = "." } dependencies = [ { name = "abx-dl" },