Acquire.ObjectStore._parregistry module¶
-
class
PARRegistry[source]¶ Bases:
objectThis is a PAR registry that is used to maintain a registry of PARs that have been created on an ObjectStore.
-
static
close(par)[source]¶ Close the passed PAR. This will remove the registration for the PAR and will also call the associated cleanup_function (if any)
-
static
get(par_uid, details_function, url_checksum=None)[source]¶ Return the PAR that matches the passed PAR_UID. If ‘url_checksum’ is supplied then this verifies that the checksum of the secret URL is correct.
This returns the PAR with a completed ‘driver_details’. The ‘driver_details’ is created from the dictionary of data saved with the PAR. The signature should be;
driver_details = details_function(data)
-
static
register(par, url_checksum, details_function, cleanup_function=None)[source]¶ Register the passed PAR, passing in the checksum of the PAR’s secret URL (so we can verify the close), and optionally supplying a cleanup_function that is called when the PAR is closed. The passed ‘details_function’ should be used to extract the object-store driver-specific details from the PAR and convert them into a dictionary. The signature should be;
driver_details = details_function(par)
-
static