Skip to content
Snippets Groups Projects
Commit 00c076fb authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Merge branch 'testing'

parents 05dff290 fef6a65a
No related branches found
No related tags found
No related merge requests found
Pipeline #24580 passed
......@@ -83,7 +83,7 @@ class ImportExecutor(TaskExecutor):
if self.storageType == "cold":
self.tapeClient.connect()
self.tapeClient.recallChecksumFiles(self.path)
self.tapeClient.recallChecksumFiles(self.path, self.jobId)
self.tapeClient.disconnect()
self.logger.info(f"Checking for invalid file/dir names in '{self.path}'")
......
......@@ -176,13 +176,14 @@ class TapeClient(object):
raise TapeClientException(cmd, exitCode, stderr)
return exitCode
def recallChecksumFiles(self, dirName):
def recallChecksumFiles(self, dirName, jobId):
"""
Recursively recalls from tape all the checksum files related to
the 'dirName' directory.
A VOSpace job ID is also required as parameter.
"""
self.logger.info("Starting RECALL_CHECKSUM operation...")
checksumFileList = "vos_recall_checksum_files-{jobId}.lst"
checksumFileList = f"vos_recall_checksum_files-{jobId}.lst"
cmd = f"find $(dirname {dirName}) -type f \( -iname \"*-md5sum.txt\" \) > {self.VOSPACE_WD}/{checksumFileList} && {self.DSMRECALL} -filelist={self.VOSPACE_WD}/{checksumFileList} > /dev/null 2>&1"
try:
stdin, stdout, stderr = self.client.exec_command(cmd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment