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: List[swh.model.model.Content]) → Dict[source]
content_add_metadata(content: List[swh.model.model.Content]) → Dict[source]
skipped_content_add(content: List[swh.model.model.SkippedContent]) → Dict[source]
origin_visit_add(visits: List[swh.model.model.OriginVisit]) → Iterable[swh.model.model.OriginVisit][source]
metadata_fetcher_add(fetchers: List[swh.model.model.MetadataFetcher]) → None[source]
metadata_authority_add(authorities: List[swh.model.model.MetadataAuthority]) → None[source]
raw_extrinsic_metadata_add(metadata: List[swh.model.model.RawExtrinsicMetadata]) → None[source]
directory_add(directories: List[swh.model.model.Directory]) → Dict[source]
revision_add(revisions: List[swh.model.model.Revision]) → Dict[source]
release_add(releases: List[swh.model.model.Release]) → Dict[source]
snapshot_add(snapshots: List[swh.model.model.Snapshot]) → Dict[source]
clear_buffers(object_types: Optional[List[str]] = None) → None[source]
flush(object_types: Optional[List[str]] = None) → Dict[source]

Specific case for buffer proxy storage failing to flush data