Loading transfer_service/db_connector.py +4 −3 Original line number Diff line number Diff line Loading @@ -406,7 +406,7 @@ class DbConnector(object): finally: self.connPool.putconn(conn, close = False) def listActiveJobs(self): def getActiveJobs(self): """Returns some info about active jobs.""" conn = self.getConnection() try: Loading @@ -420,6 +420,7 @@ class DbConnector(object): owner_id FROM job WHERE phase NOT IN ('ABORTED', 'ARCHIVED', 'COMPLETED', 'ERROR') AND Loading Loading @@ -447,12 +448,12 @@ class DbConnector(object): finally: self.connPool.putconn(conn, close = False) def listJobsByPhase(self, phase): def getJobsByPhase(self, phase): """Returns some info about jobs according to the phase.""" conn = self.getConnection() try: cursor = conn.cursor(cursor_factory = RealDictCursor) if phase in [ "PENDING", "QUEUED", "EXECUTING" ]: if phase in [ "PENDING", "QUEUED", "EXECUTING", "HELD", "SUSPENDED" ]: cursor.execute(""" SELECT job_id, job_type, Loading transfer_service/job_rpc_server.py +2 −2 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ class JobRPCServer(RedisRPCServer): "errorMsg": errorMsg } elif requestBody["requestType"] == "JOB_LIST": try: result = self.dbConn.listActiveJobs() result = self.dbConn.getActiveJobs() except Exception: errorMsg = "Database error." self.logger.exception(errorMsg) Loading @@ -62,7 +62,7 @@ class JobRPCServer(RedisRPCServer): elif requestBody["requestType"] == "JOB_BY_PHASE": jobPhase = requestBody["jobPhase"] try: result = self.dbConn.listJobsByPhase(jobPhase) result = self.dbConn.getJobsByPhase(jobPhase) except Exception: errorMsg = "Database error." self.logger.exception(errorMsg) Loading Loading
transfer_service/db_connector.py +4 −3 Original line number Diff line number Diff line Loading @@ -406,7 +406,7 @@ class DbConnector(object): finally: self.connPool.putconn(conn, close = False) def listActiveJobs(self): def getActiveJobs(self): """Returns some info about active jobs.""" conn = self.getConnection() try: Loading @@ -420,6 +420,7 @@ class DbConnector(object): owner_id FROM job WHERE phase NOT IN ('ABORTED', 'ARCHIVED', 'COMPLETED', 'ERROR') AND Loading Loading @@ -447,12 +448,12 @@ class DbConnector(object): finally: self.connPool.putconn(conn, close = False) def listJobsByPhase(self, phase): def getJobsByPhase(self, phase): """Returns some info about jobs according to the phase.""" conn = self.getConnection() try: cursor = conn.cursor(cursor_factory = RealDictCursor) if phase in [ "PENDING", "QUEUED", "EXECUTING" ]: if phase in [ "PENDING", "QUEUED", "EXECUTING", "HELD", "SUSPENDED" ]: cursor.execute(""" SELECT job_id, job_type, Loading
transfer_service/job_rpc_server.py +2 −2 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ class JobRPCServer(RedisRPCServer): "errorMsg": errorMsg } elif requestBody["requestType"] == "JOB_LIST": try: result = self.dbConn.listActiveJobs() result = self.dbConn.getActiveJobs() except Exception: errorMsg = "Database error." self.logger.exception(errorMsg) Loading @@ -62,7 +62,7 @@ class JobRPCServer(RedisRPCServer): elif requestBody["requestType"] == "JOB_BY_PHASE": jobPhase = requestBody["jobPhase"] try: result = self.dbConn.listJobsByPhase(jobPhase) result = self.dbConn.getJobsByPhase(jobPhase) except Exception: errorMsg = "Database error." self.logger.exception(errorMsg) Loading