Loading file_catalog/05-data.sql +1 −2 Original line number Diff line number Diff line Loading @@ -5,4 +5,3 @@ INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES (NULL, '', 'container', '3354', '3354'); -- / INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES ('', 'home', 'container', '3354', '3354'); -- /home INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES ('2', 'curban', 'container', '3354', '3354'); -- /home/curban INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES ('2.3', 'store', 'container', '3354', '3354'); -- /home/curban/store transfer_service/db_connector.py +5 −6 Original line number Diff line number Diff line Loading @@ -30,14 +30,13 @@ class DbConnector(object): def insertNode(self, node, parentOSPath): if(self.conn): print(f"parentOSPath: {parentOSPath}") #print(f"parentOSPath: {parentOSPath}") self.cursor.execute("SELECT get_ltree_path(%s)", (parentOSPath,)) parentLtreePath = self.cursor.fetchone()[0] #print(f"parentLtreePath: {parentLtreePath}, type: {type(parentLtreePath)}") self.cursor.execute("INSERT INTO Node(parentPath, name, type, ownerID, creatorID) VALUES (%s, %s, %s, %s, %s);", (parentLtreePath, node.name, node.type, node.ownerID, node.creatorID)) self.conn.commit() parentLtreePath = self.cursor.fetchall() print(f"parentLtreePath: {parentLtreePath}") #self.cursor.execute("INSERT INTO Node(parentPath, name, type, ownerID, creatorID) VALUES (%s, %s, %s, %s, %s)", # (parentLtreePath, node.name, node.type, node.ownerID, node.creatorID,)) #self.conn.commit() def selectNode(self): pass Loading transfer_service/store_preprocessor.py +1 −1 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ class StorePreprocessor(object): for flist in files: for file in flist: print(f"FILE {file}") print(f"FILE: {file}") dnode = Node(os.path.basename(file), "data") dnode.setParentPath(os.path.dirname(file)) dnode.setOwnerID("3354") Loading Loading
file_catalog/05-data.sql +1 −2 Original line number Diff line number Diff line Loading @@ -5,4 +5,3 @@ INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES (NULL, '', 'container', '3354', '3354'); -- / INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES ('', 'home', 'container', '3354', '3354'); -- /home INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES ('2', 'curban', 'container', '3354', '3354'); -- /home/curban INSERT INTO Node (parentPath, name, type, ownerID, creatorID) VALUES ('2.3', 'store', 'container', '3354', '3354'); -- /home/curban/store
transfer_service/db_connector.py +5 −6 Original line number Diff line number Diff line Loading @@ -30,14 +30,13 @@ class DbConnector(object): def insertNode(self, node, parentOSPath): if(self.conn): print(f"parentOSPath: {parentOSPath}") #print(f"parentOSPath: {parentOSPath}") self.cursor.execute("SELECT get_ltree_path(%s)", (parentOSPath,)) parentLtreePath = self.cursor.fetchone()[0] #print(f"parentLtreePath: {parentLtreePath}, type: {type(parentLtreePath)}") self.cursor.execute("INSERT INTO Node(parentPath, name, type, ownerID, creatorID) VALUES (%s, %s, %s, %s, %s);", (parentLtreePath, node.name, node.type, node.ownerID, node.creatorID)) self.conn.commit() parentLtreePath = self.cursor.fetchall() print(f"parentLtreePath: {parentLtreePath}") #self.cursor.execute("INSERT INTO Node(parentPath, name, type, ownerID, creatorID) VALUES (%s, %s, %s, %s, %s)", # (parentLtreePath, node.name, node.type, node.ownerID, node.creatorID,)) #self.conn.commit() def selectNode(self): pass Loading
transfer_service/store_preprocessor.py +1 −1 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ class StorePreprocessor(object): for flist in files: for file in flist: print(f"FILE {file}") print(f"FILE: {file}") dnode = Node(os.path.basename(file), "data") dnode.setParentPath(os.path.dirname(file)) dnode.setOwnerID("3354") Loading