Loading client/vos_import +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class VOSImport(AMQPClient): if "responseType" not in importResponse: sys.exit("FATAL: Malformed response, storage acknowledge expected.\n") elif importResponse["responseType"] == "IMPORT_STARTED": print("\nImport procedure started. You'll receive an email at the end of the operation.\n") print("\nImport procedure started.\nYou'll receive an email at the end of the operation.\n") elif importResponse["responseType"] == "ERROR": errorCode = importResponse["errorCode"] errorMsg = importResponse["errorMsg"] Loading transfer_service/import_amqp_server.py +9 −5 Original line number Diff line number Diff line Loading @@ -161,10 +161,10 @@ class ImportAMQPServer(AMQPServer): dbConn.setAsyncTrans(vospacePath, True) dbConn.setSticky(vospacePath, True) now = dt.now() nodeList.append([ now, dir, vospacePath, "DONE" ]) nodeList.append([ now, dir, vospacePath, "container", "DONE" ]) else: now = dt.now() nodeList.append([ now, dir, vospacePath, "SKIP" ]) nodeList.append([ now, dir, vospacePath, "container", "SKIP" ]) for flist in files: for file in flist: Loading Loading @@ -200,13 +200,13 @@ class ImportAMQPServer(AMQPServer): dbConn.setAsyncTrans(vospacePath, True) dbConn.setSticky(vospacePath, True) now = dt.now() nodeList.append([ now, file, vospacePath, "DONE" ]) nodeList.append([ now, file, vospacePath, "data", "DONE" ]) else: now = dt.now() nodeList.append([ now, file, vospacePath, "SKIP" ]) nodeList.append([ now, file, vospacePath, "data", "SKIP" ]) nlfp.write(tabulate(nodeList, headers = [ "Timestamp", "OS path", "VOSpace path", "Result"], headers = [ "Timestamp", "OS path", "VOSpace path", "Node type", "Result"], tablefmt = "simple")) nlfp.close() end = dt.now() Loading @@ -221,6 +221,10 @@ class ImportAMQPServer(AMQPServer): Creator ID: {userId} Start time: {start} End time: {end} Processed nodes: {len(nodeList)} Imported nodes: {sum(res[-1] == 'DONE' for res in nodeList)} Skipped nodes: {sum(res[-1] == 'SKIP' for res in nodeList)} """ m.setMessageWithAttachment("VOSpace import notification", msg, nodeListFile) m.send() Loading Loading
client/vos_import +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class VOSImport(AMQPClient): if "responseType" not in importResponse: sys.exit("FATAL: Malformed response, storage acknowledge expected.\n") elif importResponse["responseType"] == "IMPORT_STARTED": print("\nImport procedure started. You'll receive an email at the end of the operation.\n") print("\nImport procedure started.\nYou'll receive an email at the end of the operation.\n") elif importResponse["responseType"] == "ERROR": errorCode = importResponse["errorCode"] errorMsg = importResponse["errorMsg"] Loading
transfer_service/import_amqp_server.py +9 −5 Original line number Diff line number Diff line Loading @@ -161,10 +161,10 @@ class ImportAMQPServer(AMQPServer): dbConn.setAsyncTrans(vospacePath, True) dbConn.setSticky(vospacePath, True) now = dt.now() nodeList.append([ now, dir, vospacePath, "DONE" ]) nodeList.append([ now, dir, vospacePath, "container", "DONE" ]) else: now = dt.now() nodeList.append([ now, dir, vospacePath, "SKIP" ]) nodeList.append([ now, dir, vospacePath, "container", "SKIP" ]) for flist in files: for file in flist: Loading Loading @@ -200,13 +200,13 @@ class ImportAMQPServer(AMQPServer): dbConn.setAsyncTrans(vospacePath, True) dbConn.setSticky(vospacePath, True) now = dt.now() nodeList.append([ now, file, vospacePath, "DONE" ]) nodeList.append([ now, file, vospacePath, "data", "DONE" ]) else: now = dt.now() nodeList.append([ now, file, vospacePath, "SKIP" ]) nodeList.append([ now, file, vospacePath, "data", "SKIP" ]) nlfp.write(tabulate(nodeList, headers = [ "Timestamp", "OS path", "VOSpace path", "Result"], headers = [ "Timestamp", "OS path", "VOSpace path", "Node type", "Result"], tablefmt = "simple")) nlfp.close() end = dt.now() Loading @@ -221,6 +221,10 @@ class ImportAMQPServer(AMQPServer): Creator ID: {userId} Start time: {start} End time: {end} Processed nodes: {len(nodeList)} Imported nodes: {sum(res[-1] == 'DONE' for res in nodeList)} Skipped nodes: {sum(res[-1] == 'SKIP' for res in nodeList)} """ m.setMessageWithAttachment("VOSpace import notification", msg, nodeListFile) m.send() Loading