Loading transfer_service/db_connector.py +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class DbConnector(object): fullPath = basePath + "/" + userName + osPath else: fullPath = basePath + "/" + userName + "/" + tstampWrappedDir + osPath return [ fullPath, storageType, userName ] return [ fullPath, storageType, userName, osPath ] def getVOSpacePathList(self, vospacePath): """Returns the list of VOSpace paths carried by a VOSpace node, according to the node VOSpace path.""" Loading transfer_service/retrieve_executor.py +7 −3 Original line number Diff line number Diff line import os import subprocess import sys Loading Loading @@ -30,14 +31,17 @@ class RetrieveExecutor(TaskExecutor): self.dbConn.connect() self.dbConn.setPhase(self.jobId, "EXECUTING") for vospacePath in self.nodeList: [srcPath, storageType, username] = self.dbConn.getOSPath(vospacePath) destPath = self.storageRetrievePath.replace("{username}", username) [srcPath, storageType, username, osRelPath] = self.dbConn.getOSPath(vospacePath) osRelParentPath = os.path.dirname(osRelPath) if osRelParentPath != "/": osRelParentPath += "/" destPath = self.storageRetrievePath.replace("{username}", username) + osRelParentPath if storageType == "cold": #srcPathPrefix = self.tapeStorageBasePath.replace("{username}", self.username) # TO BE DONE pass else: sp = subprocess.run(["rsync", "-av", srcPath, destPath + "/"], capture_output = True) sp = subprocess.run(["rsync", "-av", srcPath, destPath], capture_output = True) if(sp.returncode or sp.stderr): self.dbConn.disconnect() return False Loading Loading
transfer_service/db_connector.py +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class DbConnector(object): fullPath = basePath + "/" + userName + osPath else: fullPath = basePath + "/" + userName + "/" + tstampWrappedDir + osPath return [ fullPath, storageType, userName ] return [ fullPath, storageType, userName, osPath ] def getVOSpacePathList(self, vospacePath): """Returns the list of VOSpace paths carried by a VOSpace node, according to the node VOSpace path.""" Loading
transfer_service/retrieve_executor.py +7 −3 Original line number Diff line number Diff line import os import subprocess import sys Loading Loading @@ -30,14 +31,17 @@ class RetrieveExecutor(TaskExecutor): self.dbConn.connect() self.dbConn.setPhase(self.jobId, "EXECUTING") for vospacePath in self.nodeList: [srcPath, storageType, username] = self.dbConn.getOSPath(vospacePath) destPath = self.storageRetrievePath.replace("{username}", username) [srcPath, storageType, username, osRelPath] = self.dbConn.getOSPath(vospacePath) osRelParentPath = os.path.dirname(osRelPath) if osRelParentPath != "/": osRelParentPath += "/" destPath = self.storageRetrievePath.replace("{username}", username) + osRelParentPath if storageType == "cold": #srcPathPrefix = self.tapeStorageBasePath.replace("{username}", self.username) # TO BE DONE pass else: sp = subprocess.run(["rsync", "-av", srcPath, destPath + "/"], capture_output = True) sp = subprocess.run(["rsync", "-av", srcPath, destPath], capture_output = True) if(sp.returncode or sp.stderr): self.dbConn.disconnect() return False Loading