archivebox.importers.service

Generic importer execution: commands discover; ordinary crawls capture.

Module Contents

Classes

Cancellation

The command runner polls this just like a threading.Event.

Functions

enqueue

pause

enqueue_due

_read_output

_finish

run_next_importer

Claim one queued run, optionally the exact run selected by a CLI caller.

recover_interrupted

_background_run

shutdown

tick

Keep discovery independent of the capture runner’s blocking crawl dispatch.

Data

logger

ACTIVE_STATUSES

_thread

_stop

API

archivebox.importers.service.logger[source]

‘getLogger(…)’

archivebox.importers.service.ACTIVE_STATUSES[source]

()

archivebox.importers.service.enqueue(source: archivebox.importers.models.ImporterSource, action: str) → archivebox.importers.models.ImporterRun[source]
archivebox.importers.service.pause(source: archivebox.importers.models.ImporterSource) → None[source]
archivebox.importers.service.enqueue_due() → None[source]
class archivebox.importers.service.Cancellation(run_id, stop_event=None)[source]

The command runner polls this just like a threading.Event.

Initialization

is_set()[source]
archivebox.importers.service._read_output(run, command, config, output_dir: pathlib.Path, cancellation)[source]
archivebox.importers.service._finish(run, items, result)[source]
archivebox.importers.service.run_next_importer(stop_event=None, *, run_id=None) → bool[source]

Claim one queued run, optionally the exact run selected by a CLI caller.

archivebox.importers.service.recover_interrupted() → None[source]
archivebox.importers.service._thread[source]

None

archivebox.importers.service._stop[source]

‘Event(…)’

archivebox.importers.service._background_run()[source]
archivebox.importers.service.shutdown()[source]
archivebox.importers.service.tick(*, daemon: bool) → bool[source]

Keep discovery independent of the capture runner’s blocking crawl dispatch.