archivebox.services.binary_service

Module Contents

Classes

ArchiveBoxBinaryService

Preserve ArchiveBox’s legacy Binary Process rows around abxpkg requests.

Functions

project_abxpkg_derived_cache_to_db

Mirror abxpkg subprocess-resolved binaries into ArchiveBox’s DB.

_provider_names

_binproviders_to_str

_persisted_overrides_for_request

API

class archivebox.services.binary_service.ArchiveBoxBinaryService(bus: abxbus.EventBus)[source]

Bases: abx_dl.services.base.BaseService

Preserve ArchiveBox’s legacy Binary Process rows around abxpkg requests.

Initialization

LISTENS_TO[source]

None

EMITS: list[type[abxbus.BaseEvent]][source]

[]

async on_BinaryRequestEvent__project_process(request: abxpkg.binary_service.BinaryRequestEvent) None[source]
async on_BinaryEvent__finalize_process(event: abxpkg.binary_service.BinaryEvent) None[source]
async _get_or_create_binary(machine, binary_name: str, request: abxpkg.binary_service.BinaryRequestEvent)[source]
_process_cmd(request: abxpkg.binary_service.BinaryRequestEvent) list[str][source]
_binary_event_json(event: abxpkg.binary_service.BinaryEvent, binary) dict[str, Any][source]
async _finalize_missing_process(request: abxpkg.binary_service.BinaryRequestEvent) None[source]
async _finalize_request_when_done(request: abxpkg.binary_service.BinaryRequestEvent) None[source]
_schedule_missing_finalize(request: abxpkg.binary_service.BinaryRequestEvent) None[source]
async flush_missing_finalizers() None[source]
async on_BinaryRequestEvent__schedule_missing_finalize(request: abxpkg.binary_service.BinaryRequestEvent) None[source]
_process_output_dir(binary, request: abxpkg.binary_service.BinaryRequestEvent) pathlib.Path[source]
_write_binary_index(binary, process, output_dir: pathlib.Path) None[source]
archivebox.services.binary_service.project_abxpkg_derived_cache_to_db(lib_dir: pathlib.Path | str | None) None[source]

Mirror abxpkg subprocess-resolved binaries into ArchiveBox’s DB.

Hook shebangs resolve binaries through the abxpkg CLI in subprocesses, so those resolutions cannot emit in-process BinaryRequestEvent/BinaryEvent objects on the ArchiveBox runner bus. abxpkg’s generic cross-process projection point is LIB_DIR/env/derived.env; ArchiveBox imports those resolved records here after hook execution.

archivebox.services.binary_service._provider_names(binproviders: str | list[str] | None) list[str][source]
archivebox.services.binary_service._binproviders_to_str(binproviders: str | list[str] | None) str[source]
archivebox.services.binary_service._persisted_overrides_for_request(request: abxpkg.binary_service.BinaryRequestEvent | None) dict[str, Any][source]