archivebox.services.archive_result_serviceο
Module Contentsο
Classesο
Functionsο
Project one ArchiveResultEvent with a single thread-sensitive ORM hop. |
APIο
- archivebox.services.archive_result_service._collect_output_metadata(plugin_dir: pathlib.Path) tuple[dict[str, dict], int, str][source]ο
- archivebox.services.archive_result_service._normalize_output_files(raw_output_files: Any) dict[str, dict][source]ο
- archivebox.services.archive_result_service._has_structured_output_metadata(output_files: dict[str, dict]) bool[source]ο
- archivebox.services.archive_result_service._summarize_output_files(output_files: dict[str, dict]) tuple[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._iter_archiveresult_records(stdout: str) list[dict][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.