buildgrid.server.cleanup.janitor.s3 module
- class buildgrid.server.cleanup.janitor.s3.ListObjectResult(key: str, version_id: str, last_modified: datetime.datetime, size: int)
Bases:
object
- key: str
- version_id: str
- last_modified: datetime
- size: int
- buildgrid.server.cleanup.janitor.s3.publish_s3_object_metrics(s3_objects: set[buildgrid.server.cleanup.janitor.s3.ListObjectResult]) None
- class buildgrid.server.cleanup.janitor.s3.S3Janitor(config: JanitorConfig, index: IndexLookup)
Bases:
object
- enumerate_versioned_bucket(bucket: str, prefix: str) Iterator[set[buildgrid.server.cleanup.janitor.s3.ListObjectResult]]
- enumerate_unversioned_bucket(bucket: str, prefix: str) Iterator[set[buildgrid.server.cleanup.janitor.s3.ListObjectResult]]
- delete_s3_entries(bucket: str, missing_objects: list[buildgrid.server.cleanup.janitor.s3.ListObjectResult]) list[str]
- get_buckets() list[str]
- generate_prefixes() list[str]
- cleanup_bucket(bucket: str) int
- start() None
- stop(*args: Any, **kwargs: Any) None
- run(stop_requested: Event) None