diff --git a/transfer_service/import_executor.py b/transfer_service/import_executor.py index 2af484355aa2ab32a950b9eec590af8ba1989dc8..f57db79efaaec211300429c293b76302337a70b3 100644 --- a/transfer_service/import_executor.py +++ b/transfer_service/import_executor.py @@ -55,7 +55,7 @@ class ImportExecutor(TaskExecutor): nodeListFile = "vos_import_report-" + timestamp nlfp = open(nodeListFile, "w") - out = open("import_amqp_server_log.txt", "a") + #out = open("import_amqp_server_log.txt", "a") if self.storageType == "cold": self.tapeClient.connect() self.tapeClient.recallChecksumFiles(self.path) @@ -65,8 +65,8 @@ class ImportExecutor(TaskExecutor): tstampWrapperDirPattern = re.compile("/[0-9]{4}_[0-9]{2}_[0-9]{2}-[0-9]{2}_[0-9]{2}_[0-9]{2}-vos_wrapper") for dir in dirs: - out.write(f"DIR dir: {dir}\n") - out.write(f"DIR pathPrefix: {self.pathPrefix}\n\n") + #out.write(f"DIR dir: {dir}\n") + #out.write(f"DIR pathPrefix: {self.pathPrefix}\n\n") if self.path in dir: parentPath = os.path.dirname(dir).split(self.pathPrefix)[1] @@ -103,14 +103,14 @@ class ImportExecutor(TaskExecutor): for flist in files: for file in flist: if self.md5calc.fileIsValid(file) and self.path in os.path.dirname(file): - out.write(f"FILE files: {files}\n") - out.write(f"FILE flist: {flist}\n") - out.write(f"FILE file: {file}\n") - out.write(f"FILE pathPrefix: {self.pathPrefix}\n") + #out.write(f"FILE files: {files}\n") + #out.write(f"FILE flist: {flist}\n") + #out.write(f"FILE file: {file}\n") + #out.write(f"FILE pathPrefix: {self.pathPrefix}\n") parentPath = os.path.dirname(file).split(self.pathPrefix)[1] - out.write(f"FILE parentPath: {parentPath}\n") + #out.write(f"FILE parentPath: {parentPath}\n") nodeName = os.path.basename(file) - out.write(f"FILE nodeName: {nodeName}\n") + #out.write(f"FILE nodeName: {nodeName}\n") dnode = Node(nodeName, "data") if tstampWrapperDirPattern.search(parentPath): @@ -119,7 +119,7 @@ class ImportExecutor(TaskExecutor): dnode.setWrapperDir(tstampWrapperDir) vospacePath = parentPath + '/' + nodeName - out.write(f"FILE vospacePath: {vospacePath}\n") + #out.write(f"FILE vospacePath: {vospacePath}\n") dnode.setParentPath(parentPath) self.storageId = self.dbConn.getStorageId(self.pathPrefix) locationId = self.dbConn.getLocationId(self.storageId) @@ -136,6 +136,7 @@ class ImportExecutor(TaskExecutor): else: now = dt.now() nodeList.append([ now, file, vospacePath, "data", "SKIP" ]) + #out.close() nlfp.write(tabulate(nodeList, headers = [ "Timestamp", "OS path", "VOSpace path", "Node type", "Result"],