Skip to content

Commit 9f0e70b

Browse files
committed
fix: removed last instance of getDistinctJobAttributes
1 parent 04ca657 commit 9f0e70b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/DIRAC/TransformationSystem/Agent/TransformationCleaningAgent.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,13 @@ def finalize(self):
222222
What I added here is done only when the agent finalize, and it's quite light-ish operation anyway.
223223
"""
224224

225-
res = self.jobDB.getDistinctJobAttributes("JobGroup", older=datetime.utcnow() - timedelta(days=365))
225+
res = self.jobDB.getDistinctAttributeValues(
226+
"Jobs",
227+
"JobGroup",
228+
older=datetime.utcnow() - timedelta(days=365),
229+
timeStamp="LastUpdateTime",
230+
)
231+
226232
if not res["OK"]:
227233
self.log.error("Failed to get job groups", res["Message"])
228234
return res

src/DIRAC/WorkloadManagementSystem/DB/JobDB.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,6 @@ def __getAttributeNames(self):
103103

104104
return S_OK()
105105

106-
#############################################################################
107-
def getDistinctJobAttributes(self, attribute, condDict=None, older=None, newer=None, timeStamp="LastUpdateTime"):
108-
"""Get distinct values of the job attribute under specified conditions"""
109-
return self.getDistinctAttributeValues(
110-
"Jobs", attribute, condDict=condDict, older=older, newer=newer, timeStamp=timeStamp
111-
)
112-
113106
#############################################################################
114107
def getJobParameters(self, jobID, paramList=None):
115108
"""Get Job Parameters defined for jobID.

0 commit comments

Comments
 (0)