swh.storage.proxies.blocking package#

Submodules#

Module contents#

swh.storage.proxies.blocking.get_datastore(cls, db)[source]#
swh.storage.proxies.blocking.blocking_overhead_timer(method_name: str) DifferentialTimer[source]#

Return a properly setup DifferentialTimer for method_name of the storage

class swh.storage.proxies.blocking.BlockingProxyStorage(blocking_db: str, storage: Dict | StorageInterface, min_pool_conns: int = 1, max_pool_conns: int = 5)[source]#

Bases: object

Blocking storage proxy

This proxy prevents visits from a known list of origins to be performed at all.

It uses a specific PostgreSQL database (which for now is colocated with the swh.storage PostgreSQL database), the access to which is implemented in the db submodule.

Sample configuration

origin_visit_status_add(visit_statuses: List[OriginVisitStatus]) Dict[str, int][source]#
origin_visit_add(visits: List[OriginVisit]) Iterable[OriginVisit][source]#
origin_add(origins: List[Origin]) Dict[str, int][source]#