archivebox.services.machine_service

Module Contents

Classes

MachineService

Functions

_is_binary_event_key

MachineEvent projector only ever writes binary-related state.

_strip_to_binary_keys

API

archivebox.services.machine_service._is_binary_event_key(key: str) bool[source]

MachineEvent projector only ever writes binary-related state.

Machine.config mirrors ArchiveBox.conf so arbitrary user keys can legitimately live there — but they get there through the file ↔ DB sync, not through events. Letting events write arbitrary keys would let an untrusted plugin overwrite security-sensitive user config (the file ↔ DB mirror is a security boundary), so the projector strips anything that isn’t a binary path or the binary install cache.

archivebox.services.machine_service._strip_to_binary_keys(config: dict[str, Any] | None) dict[str, Any][source]
class archivebox.services.machine_service.MachineService(bus)[source]

Bases: abx_dl.services.base.BaseService

Initialization

LISTENS_TO[source]

None

EMITS[source]

[]

async on_MachineEvent__save_to_db(event: abx_dl.events.MachineEvent) None[source]