archivebox.services.archive_result_service
Module Contents
Classes
Project abx-dl ArchiveResult facts into Django models. |
Functions
Project one ArchiveResultEvent with a single thread-sensitive ORM hop. |
|
Project a running abx-dl hook after its OS process is persisted. |
API
- archivebox.services.archive_result_service._manifest_metadata(manifest: abx_dl.output_files.OutputManifest) tuple[dict[str, dict], int, str][source]
- archivebox.services.archive_result_service._resolve_output_metadata(raw_output_files: Any, plugin_dir: pathlib.Path) tuple[dict[str, dict], int, str][source]
- archivebox.services.archive_result_service._normalize_snapshot_title(candidate: str, *, snapshot_url: str) str[source]
- archivebox.services.archive_result_service._extract_snapshot_title(snapshot_output_dir: str, plugin: str, output_str: str, *, snapshot_url: str) str[source]
- archivebox.services.archive_result_service._should_update_snapshot_title(current_title: str, next_title: str, *, snapshot_url: str) bool[source]
- archivebox.services.archive_result_service._save_archiveresult_event_to_db(event: abx_dl.events.ArchiveResultEvent, process_started: abx_dl.events.ProcessStartedEvent | None) None[source]
Project one ArchiveResultEvent with a single thread-sensitive ORM hop.
Django’s async ORM still delegates each query to sync Django work. The hot search/index maintenance path was paying that handoff separately for Snapshot lookup, Process lookup, ArchiveResult lookup, update, and title checks. Keep the public ArchiveResultEvent path intact, but run the DB projection as one short synchronous block so SQLite sees the same indexed reads/writes without per-query asyncio/threadpool churn.
- archivebox.services.archive_result_service.mark_archiveresult_started(event: abx_dl.events.ProcessStartedEvent, *, snapshot_id: str, process_id: str) None[source]
Project a running abx-dl hook after its OS process is persisted.