rucio_utils¶
Utility functions for interacting with the Rucio web API.
- class merge_utils.rucio_utils.RucioRetriever(source: FileRetriever)[source]¶
Class for managing asynchronous queries to the Rucio web API.
Initialize the RucioRetriever with a source of file metadata.
- Parameters:
source – FileRetriever object to use as the source of file metadata
- async checksum(file: MergeFile, rucio: dict) bool [source]¶
Ensure file sizes and checksums from Rucio agree with the input metadata.
- Parameters:
file – MergeFile object to check
rucio – Rucio replicas dictionary
- Returns:
True if files match, False otherwise
- property dupes: dict¶
Return the set of duplicate files from the source
- async input_batches() AsyncGenerator[dict, None] [source]¶
Asynchronously retrieve metadata for the next batch of files.
- Returns:
dict of MergeFile objects that were added
- property missing: dict¶
Return the set of missing files from the source
- output_chunks() Generator[MergeChunk, None, None] [source]¶
Yield chunks of files for merging.
- Returns:
yeilds a series of MergeChunk objects