swh.storage.retry module

swh.storage.retry.should_retry_adding(retry_state) → bool[source]

Retry if the error/exception is (probably) not about a caller error

class swh.storage.retry.RetryingProxyStorage(storage)[source]

Bases: object

Storage implementation which retries adding objects when it specifically fails (hash collision, integrity error).

content_add(content: Iterable[swh.model.model.Content]) → Dict[source]
content_add_metadata(content: Iterable[swh.model.model.Content]) → Dict[source]
skipped_content_add(content: Iterable[swh.model.model.SkippedContent]) → Dict[source]
origin_add_one(origin: swh.model.model.Origin) → str[source]
origin_visit_add(visits: Iterable[swh.model.model.OriginVisit]) → Iterable[swh.model.model.OriginVisit][source]
metadata_fetcher_add(name: str, version: str, metadata: Dict[str, Any]) → None[source]
metadata_authority_add(type: str, url: str, metadata: Dict[str, Any]) → None[source]
origin_metadata_add(origin_url: str, discovery_date: datetime.datetime, authority: Dict[str, Any], fetcher: Dict[str, Any], format: str, metadata: bytes) → None[source]
directory_add(directories: Iterable[swh.model.model.Directory]) → Dict[source]
revision_add(revisions: Iterable[swh.model.model.Revision]) → Dict[source]
release_add(releases: Iterable[swh.model.model.Release]) → Dict[source]
snapshot_add(snapshots: Iterable[swh.model.model.Snapshot]) → Dict[source]
clear_buffers(object_types: Optional[Iterable[str]] = None) → None[source]
flush(object_types: Optional[Iterable[str]] = None) → Dict[source]

Specific case for buffer proxy storage failing to flush data