Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/interface.py
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | ) -> Dict[str, Any]: | ||||
... | ... | ||||
@remote_api_endpoint("content/partition") | @remote_api_endpoint("content/partition") | ||||
def content_get_partition( | def content_get_partition( | ||||
self, | self, | ||||
partition_id: int, | partition_id: int, | ||||
nb_partitions: int, | nb_partitions: int, | ||||
limit: int = 1000, | limit: int = 1000, | ||||
page_token: str = None, | page_token: Optional[str] = None, | ||||
): | ) -> Dict[str, Any]: | ||||
"""Splits contents into nb_partitions, and returns one of these based on | """Splits contents into nb_partitions, and returns one of these based on | ||||
partition_id (which must be in [0, nb_partitions-1]) | partition_id (which must be in [0, nb_partitions-1]) | ||||
There is no guarantee on how the partitioning is done, or the | There is no guarantee on how the partitioning is done, or the | ||||
result order. | result order. | ||||
Args: | Args: | ||||
partition_id (int): index of the partition to fetch | partition_id (int): index of the partition to fetch | ||||
▲ Show 20 Lines • Show All 1,079 Lines • Show Last 20 Lines |