Loading transfer_service/db_connector.py +15 −1 Original line number Diff line number Diff line Loading @@ -256,6 +256,20 @@ class DbConnector(object): (value, nodeVOSPath,)) self.conn.commit() def setSticky(self, nodeVOSPath, value): """Sets the 'sticky' flag for a VOSpace node.""" if self.conn: self.cursor.execute(""" UPDATE node SET sticky = %s WHERE path <@ (SELECT path FROM node_path p JOIN node n ON p.node_id = n.node_id WHERE p.vos_path = %s); """, (value, nodeVOSPath,)) self.conn.commit() def setBusyState(self, nodeVOSPath, value): """Sets the 'busy_state' flag for a VOSpace node.""" if self.conn: Loading transfer_service/node.py +4 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ class Node(object): self.locationId = None self.format = None self.transferType = None self.sticky = None self.busyState = None self.ownerID = None self.creatorID = None Loading Loading @@ -68,6 +69,9 @@ class Node(object): def setTransferType(self, transferType): self.transferType = transferType def setSticky(self, sticky): self.sticky = sticky def setBusyState(self, busyState): self.busyState = busyState Loading transfer_service/store_executor.py +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ class StoreExecutor(TaskExecutor): self.dbConn.connect() for nodeVOSPath in self.nodeList: self.dbConn.setAsyncTrans(nodeVOSPath, True); self.dbConn.setSticky(nodeVOSPath, True); self.dbConn.setBusyState(nodeVOSPath, False); self.dbConn.disconnect() Loading Loading
transfer_service/db_connector.py +15 −1 Original line number Diff line number Diff line Loading @@ -256,6 +256,20 @@ class DbConnector(object): (value, nodeVOSPath,)) self.conn.commit() def setSticky(self, nodeVOSPath, value): """Sets the 'sticky' flag for a VOSpace node.""" if self.conn: self.cursor.execute(""" UPDATE node SET sticky = %s WHERE path <@ (SELECT path FROM node_path p JOIN node n ON p.node_id = n.node_id WHERE p.vos_path = %s); """, (value, nodeVOSPath,)) self.conn.commit() def setBusyState(self, nodeVOSPath, value): """Sets the 'busy_state' flag for a VOSpace node.""" if self.conn: Loading
transfer_service/node.py +4 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ class Node(object): self.locationId = None self.format = None self.transferType = None self.sticky = None self.busyState = None self.ownerID = None self.creatorID = None Loading Loading @@ -68,6 +69,9 @@ class Node(object): def setTransferType(self, transferType): self.transferType = transferType def setSticky(self, sticky): self.sticky = sticky def setBusyState(self, busyState): self.busyState = busyState Loading
transfer_service/store_executor.py +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ class StoreExecutor(TaskExecutor): self.dbConn.connect() for nodeVOSPath in self.nodeList: self.dbConn.setAsyncTrans(nodeVOSPath, True); self.dbConn.setSticky(nodeVOSPath, True); self.dbConn.setBusyState(nodeVOSPath, False); self.dbConn.disconnect() Loading