swh.scrubber.base_checker module#
- class swh.scrubber.base_checker.BaseChecker(db: ScrubberDb, config_id: int)[source]#
Bases:
ABC
Base Checker class wrapping common features.
- property config: ConfigEntry#
Returns a
ConfigEntry
instance containing checker configuration.
- property datastore: Datastore#
Returns a
Datastore
instance representing the source of data being checked.
- property object_type: ObjectType#
Returns the type of object being checked.
- class swh.scrubber.base_checker.BasePartitionChecker(db: ScrubberDb, config_id: int, limit: int = 0)[source]#
Bases:
BaseChecker
Base class for checkers processing partition of objects.
- run() None [source]#
Runs on all objects of
object_type
in each partition betweenstart_partition_id
(inclusive) andend_partition_id
(exclusive).
- abstract check_partition(object_type: ObjectType, partition_id: int) None [source]#
Abstract method that derived classes must implement to check objects in partition.