Fix docs root install ownership and live progress rows

This commit is contained in:
Nick Sweeting 2026-07-26 20:59:08 -07:00
parent eb1689796f
commit e6c3dc8a64
No known key found for this signature in database
5 changed files with 10 additions and 8 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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)

View File

@ -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}"

View File

@ -123,7 +123,7 @@ wheels = [
[[package]]
name = "archivebox"
version = "0.9.35rc150"
version = "0.9.35rc151"
source = { editable = "." }
dependencies = [
{ name = "abx-dl" },