swh.storage.writer module

class swh.storage.writer.JournalWriter(journal_writer)[source]

Bases: object

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

write_additions(obj_type, values) → None[source]
content_add(contents: Iterable[swh.model.model.Content]) → None[source]

Add contents to the journal. Drop the data field if provided.

content_update(contents: Iterable[Dict[str, Any]]) → None[source]
content_add_metadata(contents: Iterable[swh.model.model.Content]) → None[source]
skipped_content_add(contents: Iterable[swh.model.model.SkippedContent]) → None[source]
directory_add(directories: Iterable[swh.model.model.Directory]) → None[source]
revision_add(revisions: Iterable[swh.model.model.Revision]) → None[source]
release_add(releases: Iterable[swh.model.model.Release]) → None[source]
snapshot_add(snapshots: Iterable[swh.model.model.Snapshot]) → None[source]
origin_visit_add(visits: Iterable[swh.model.model.OriginVisit]) → None[source]
origin_visit_status_add(visit_statuses: Iterable[swh.model.model.OriginVisitStatus]) → None[source]
origin_add(origins: Iterable[swh.model.model.Origin]) → None[source]
raw_extrinsic_metadata_add(metadata: Iterable[swh.model.model.RawExtrinsicMetadata]) → None[source]
metadata_fetcher_add(fetchers: Iterable[swh.model.model.MetadataFetcher]) → None[source]
metadata_authority_add(authorities: Iterable[swh.model.model.MetadataAuthority]) → None[source]