diff --git a/transfer_service/retrieve_preprocessor.py b/transfer_service/retrieve_preprocessor.py index 500dfa6d9ebc99dd10365a23167fb6c0b4489c0a..594f38740c96e575a0f917858c37bd090a105382 100644 --- a/transfer_service/retrieve_preprocessor.py +++ b/transfer_service/retrieve_preprocessor.py @@ -18,12 +18,15 @@ class RetrievePreprocessor(TaskExecutor): super(RetrievePreprocessor, self).__init__() def execute(self): + nodeType = self.jobObj.jobInfo["transfer"]["protocols"][0]["param"][0]["value"] vospacePath = self.jobObj.jobInfo["transfer"]["target"].split("!vospace")[1] - self.dbConn.connect() - osPath = self.dbConn.getOSPath(vospacePath) - self.dbConn.disconnect() - self.nodeList.append(osPath) - self.jobObj.jobInfo["transfer"]["nodeList"] = self.nodeList + if nodeType == "single": + self.nodeList.append(vospacePath) + else: + self.dbConn.connect() + self.nodeList = self.dbConn.getVOSpacePathList(vospacePath) + self.dbConn.disconnect() + self.jobObj.jobInfo["nodeList"] = self.nodeList def run(self): print("Starting retrieve preprocessor...") @@ -32,7 +35,7 @@ class RetrievePreprocessor(TaskExecutor): while True: self.wait() if self.destQueue.len() < self.maxReadyJobs and self.srcQueue.len() > 0: - self.jobObj = self.srcQueue.getJob() + self.jobObj = self.srcQueue.getJob() self.execute() self.srcQueue.extractJob() self.destQueue.insertJob(self.jobObj)