rucio_utils

Utility functions for interacting with the Rucio web API.

class merge_utils.rucio_utils.RucioFinder(source: MetaRetriever)[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

async connect() None[source]

Connect to the Rucio web API

output_chunks() Generator[MergeChunk, None, None][source]

Yield chunks of files for merging.

Returns:

yeilds a series of MergeChunk objects

async process(files: dict) None[source]

Process a batch of files to find their physical locations in Rucio.

Parameters:

files – dictionary of files to process

run() None[source]

Retrieve metadata for all files.