From e556b447068eddbb5a5fbcaa828d06d00d5f3c5b Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Fri, 23 Aug 2024 17:12:10 +0200 Subject: [PATCH] feat (FTS): only take active job for active operation (speedup) --- src/DIRAC/DataManagementSystem/DB/FTS3DB.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DIRAC/DataManagementSystem/DB/FTS3DB.py b/src/DIRAC/DataManagementSystem/DB/FTS3DB.py index 5dd87228493..c944436e4b8 100644 --- a/src/DIRAC/DataManagementSystem/DB/FTS3DB.py +++ b/src/DIRAC/DataManagementSystem/DB/FTS3DB.py @@ -311,6 +311,7 @@ def getActiveJobs(self, limit=20, lastMonitor=None, jobAssignmentTag="Assigned") session.query(FTS3Job) .join(FTS3Operation) .filter(FTS3Job.status.in_(FTS3Job.NON_FINAL_STATES)) + .filter(FTS3Operation.status == "Active") .filter(FTS3Job.assignment.is_(None)) .filter(FTS3Operation.assignment.is_(None)) )