Loading client/vos_data +0 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ DESCRIPTION def store(self, cmd, username): request_type = cmd.upper() if request_type == "CSTORE": sys.exit("\nNo se pol (per ora).\n") storeRequest = { "requestType": request_type, "userName": username } print(f"\nSending {request_type} request...\n") storeResponse = self.call(storeRequest) Loading transfer_service/store_executor.py +7 −16 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ from system_utils import SystemUtils from tape_client import TapeClient from task_executor import TaskExecutor class StoreExecutor(TaskExecutor): def __init__(self): Loading Loading @@ -40,18 +41,8 @@ class StoreExecutor(TaskExecutor): self.dbConn.setPhase(self.jobId, "EXECUTING") srcPathPrefix = self.storageStorePath.replace("{username}", self.username) srcData = os.listdir(srcPathPrefix) if self.requestType == "CSTORE": destPathPrefix = self.dbConn.getStorageBasePath(self.storageId) + '/' + self.username self.dbConn.disconnect() #destPathPrefix = self.tapeStorageBasePath.replace("{username}", self.username) self.tapeClient.connect() for el in srcData: self.tapeClient.copy(srcPathPrefix + '/' + el, destPathPrefix + '/' + el) self.tapeClient.disconnect() else: destPathPrefix = self.dbConn.getStorageBasePath(self.storageId) + '/' + self.username self.dbConn.disconnect() #destPathPrefix = self.serverStorageBasePath.replace("{username}", self.username) sp = subprocess.run(["rsync", "-av", srcPathPrefix + '/', destPathPrefix + '/'], capture_output = True) if(sp.returncode or sp.stderr): return False Loading Loading
client/vos_data +0 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ DESCRIPTION def store(self, cmd, username): request_type = cmd.upper() if request_type == "CSTORE": sys.exit("\nNo se pol (per ora).\n") storeRequest = { "requestType": request_type, "userName": username } print(f"\nSending {request_type} request...\n") storeResponse = self.call(storeRequest) Loading
transfer_service/store_executor.py +7 −16 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ from system_utils import SystemUtils from tape_client import TapeClient from task_executor import TaskExecutor class StoreExecutor(TaskExecutor): def __init__(self): Loading Loading @@ -40,18 +41,8 @@ class StoreExecutor(TaskExecutor): self.dbConn.setPhase(self.jobId, "EXECUTING") srcPathPrefix = self.storageStorePath.replace("{username}", self.username) srcData = os.listdir(srcPathPrefix) if self.requestType == "CSTORE": destPathPrefix = self.dbConn.getStorageBasePath(self.storageId) + '/' + self.username self.dbConn.disconnect() #destPathPrefix = self.tapeStorageBasePath.replace("{username}", self.username) self.tapeClient.connect() for el in srcData: self.tapeClient.copy(srcPathPrefix + '/' + el, destPathPrefix + '/' + el) self.tapeClient.disconnect() else: destPathPrefix = self.dbConn.getStorageBasePath(self.storageId) + '/' + self.username self.dbConn.disconnect() #destPathPrefix = self.serverStorageBasePath.replace("{username}", self.username) sp = subprocess.run(["rsync", "-av", srcPathPrefix + '/', destPathPrefix + '/'], capture_output = True) if(sp.returncode or sp.stderr): return False Loading