Skip to content

Commit fdb5f49

Browse files
committed
fix: removed last instance of getDistinctJobAttributes
1 parent b885720 commit fdb5f49

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
@@ -224,7 +224,13 @@ def finalize(self):
224224
What I added here is done only when the agent finalize, and it's quite light-ish operation anyway.
225225
"""
226226

227-
res = self.jobDB.getDistinctJobAttributes("JobGroup", older=datetime.utcnow() - timedelta(days=365))
227+
res = self.jobDB.getDistinctAttributeValues(
228+
"Jobs",
229+
"JobGroup",
230+
older=datetime.utcnow() - timedelta(days=365),
231+
timeStamp="LastUpdateTime",
232+
)
233+
228234
if not res["OK"]:
229235
self.log.error("Failed to get job groups", res["Message"])
230236
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)