Loading transfer_service/db_connector.py +1 −19 Original line number Diff line number Diff line Loading @@ -626,12 +626,11 @@ class DbConnector(object): location_id, async_trans, sticky, busy_state, job_id, creator_id, content_length, content_md5) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) ON CONFLICT DO NOTHING RETURNING node_id; Loading @@ -644,7 +643,6 @@ class DbConnector(object): node.locationId, node.asyncTrans, node.sticky, node.busyState, node.jobId, node.creatorId, node.contentLength, Loading Loading @@ -675,22 +673,6 @@ class DbConnector(object): if not conn.closed: conn.rollback() def setBusyState(self, nodeVOSPath, value): """Sets the 'busy_state' flag for a VOSpace node.""" with self.getConnection() as conn: try: cursor = conn.cursor(cursor_factory = RealDictCursor) cursor.execute(""" UPDATE node c SET busy_state = %s FROM node n WHERE c.path <@ n.path AND n.node_id = id_from_vos_path(%s); """, (value, nodeVOSPath,)) conn.commit() except Exception as e: if not conn.closed: conn.rollback() def setJobId(self, nodeVOSPath, value): """Sets the 'job_id' flag for a VOSpace node.""" with self.getConnection() as conn: Loading transfer_service/import_executor.py +0 −2 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ class ImportExecutor(TaskExecutor): cnode.setParentPath(parentPath) locationId = self.dbConn.getLocationId(self.storageId) cnode.setLocationId(locationId) cnode.setBusyState(False) cnode.setCreatorId(self.userId) cnode.setContentLength(0) cnode.setAsyncTrans(True) Loading Loading @@ -143,7 +142,6 @@ class ImportExecutor(TaskExecutor): self.storageId = self.dbConn.getStorageId(self.pathPrefix) locationId = self.dbConn.getLocationId(self.storageId) dnode.setLocationId(locationId) dnode.setBusyState(False) dnode.setCreatorId(self.userId) dnode.setContentLength(os.path.getsize(file)) dnode.setContentMD5(self.md5calc.getMD5(file)) Loading transfer_service/node.py +0 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ class Node(object): self.format = None self.asyncTrans = False self.sticky = False self.busyState = None self.jobId = None self.creatorId = None self.groupRead = [] Loading Loading @@ -73,9 +72,6 @@ class Node(object): def setSticky(self, sticky): self.sticky = sticky def setBusyState(self, busyState): self.busyState = busyState def setJobId(self, jobId): self.jobId = jobId Loading transfer_service/store_executor.py +0 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,6 @@ class StoreExecutor(TaskExecutor): for nodeVOSPath in self.nodeList: out.write(f"nodeListElement: {nodeVOSPath}\n") self.dbConn.setAsyncTrans(nodeVOSPath, True) self.dbConn.setBusyState(nodeVOSPath, False) self.dbConn.setJobId(nodeVOSPath, None) self.jobObj.setPhase("COMPLETED") self.dbConn.setPhase(self.jobId, "COMPLETED") Loading transfer_service/store_preprocessor.py +0 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,6 @@ class StorePreprocessor(TaskExecutor): cnode.setParentPath(basePath) locationId = self.dbConn.getLocationId(self.storageId) cnode.setLocationId(locationId) cnode.setBusyState(True) cnode.setJobId(self.jobId) cnode.setCreatorId(self.userId) cnode.setContentLength(0) Loading Loading @@ -188,7 +187,6 @@ class StorePreprocessor(TaskExecutor): dnode.setParentPath(basePath) locationId = self.dbConn.getLocationId(self.storageId) dnode.setLocationId(locationId) dnode.setBusyState(True) dnode.setJobId(self.jobId) dnode.setCreatorId(self.userId) dnode.setContentLength(os.path.getsize(file)) Loading Loading
transfer_service/db_connector.py +1 −19 Original line number Diff line number Diff line Loading @@ -626,12 +626,11 @@ class DbConnector(object): location_id, async_trans, sticky, busy_state, job_id, creator_id, content_length, content_md5) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) ON CONFLICT DO NOTHING RETURNING node_id; Loading @@ -644,7 +643,6 @@ class DbConnector(object): node.locationId, node.asyncTrans, node.sticky, node.busyState, node.jobId, node.creatorId, node.contentLength, Loading Loading @@ -675,22 +673,6 @@ class DbConnector(object): if not conn.closed: conn.rollback() def setBusyState(self, nodeVOSPath, value): """Sets the 'busy_state' flag for a VOSpace node.""" with self.getConnection() as conn: try: cursor = conn.cursor(cursor_factory = RealDictCursor) cursor.execute(""" UPDATE node c SET busy_state = %s FROM node n WHERE c.path <@ n.path AND n.node_id = id_from_vos_path(%s); """, (value, nodeVOSPath,)) conn.commit() except Exception as e: if not conn.closed: conn.rollback() def setJobId(self, nodeVOSPath, value): """Sets the 'job_id' flag for a VOSpace node.""" with self.getConnection() as conn: Loading
transfer_service/import_executor.py +0 −2 Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ class ImportExecutor(TaskExecutor): cnode.setParentPath(parentPath) locationId = self.dbConn.getLocationId(self.storageId) cnode.setLocationId(locationId) cnode.setBusyState(False) cnode.setCreatorId(self.userId) cnode.setContentLength(0) cnode.setAsyncTrans(True) Loading Loading @@ -143,7 +142,6 @@ class ImportExecutor(TaskExecutor): self.storageId = self.dbConn.getStorageId(self.pathPrefix) locationId = self.dbConn.getLocationId(self.storageId) dnode.setLocationId(locationId) dnode.setBusyState(False) dnode.setCreatorId(self.userId) dnode.setContentLength(os.path.getsize(file)) dnode.setContentMD5(self.md5calc.getMD5(file)) Loading
transfer_service/node.py +0 −4 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ class Node(object): self.format = None self.asyncTrans = False self.sticky = False self.busyState = None self.jobId = None self.creatorId = None self.groupRead = [] Loading Loading @@ -73,9 +72,6 @@ class Node(object): def setSticky(self, sticky): self.sticky = sticky def setBusyState(self, busyState): self.busyState = busyState def setJobId(self, jobId): self.jobId = jobId Loading
transfer_service/store_executor.py +0 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,6 @@ class StoreExecutor(TaskExecutor): for nodeVOSPath in self.nodeList: out.write(f"nodeListElement: {nodeVOSPath}\n") self.dbConn.setAsyncTrans(nodeVOSPath, True) self.dbConn.setBusyState(nodeVOSPath, False) self.dbConn.setJobId(nodeVOSPath, None) self.jobObj.setPhase("COMPLETED") self.dbConn.setPhase(self.jobId, "COMPLETED") Loading
transfer_service/store_preprocessor.py +0 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,6 @@ class StorePreprocessor(TaskExecutor): cnode.setParentPath(basePath) locationId = self.dbConn.getLocationId(self.storageId) cnode.setLocationId(locationId) cnode.setBusyState(True) cnode.setJobId(self.jobId) cnode.setCreatorId(self.userId) cnode.setContentLength(0) Loading Loading @@ -188,7 +187,6 @@ class StorePreprocessor(TaskExecutor): dnode.setParentPath(basePath) locationId = self.dbConn.getLocationId(self.storageId) dnode.setLocationId(locationId) dnode.setBusyState(True) dnode.setJobId(self.jobId) dnode.setCreatorId(self.userId) dnode.setContentLength(os.path.getsize(file)) Loading