swh.scrubber.utils module#
- swh.scrubber.utils.iter_corrupt_objects(db: ScrubberDb, start_object: CoreSWHID, end_object: CoreSWHID, origin_url: str | None, cb: Callable[[CorruptObject, cursor], None]) None [source]#
Fetches objects and calls
cb
on each of them.objects are fetched with an update lock, with the same transaction as
cb
, which is automatically committed aftercb
runs.