swh.indexer.storage.writer module

class swh.indexer.storage.writer.JournalWriter(tool_getter: Callable[[int], Dict[str, Any]], journal_writer)[source]

Bases: object

Journal writer storage collaborator. It’s in charge of adding objects to the journal.

Parameters
  • tool_getter – a callable that takes a tool_id and return a dict representing a tool object

  • journal_writer – configuration passed to swh.journal.writer.get_journal_writer

write_additions(obj_type, entries: Iterable[swh.indexer.storage.model.BaseRow]) None[source]