Skip to content

Commit 3f96b5b

Browse files
committed
feat (TransformationCleaningAgent): only query the requested parameters for getTransformations
1 parent cb09243 commit 3f96b5b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/DIRAC/TransformationSystem/Agent/TransformationCleaningAgent.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def execute(self):
144144

145145
# Obtain the transformations in Cleaning status and remove any mention of the jobs/files
146146
res = self.transClient.getTransformations(
147-
{"Status": TransformationStatus.CLEANING, "Type": self.transformationTypes}
147+
{"Status": TransformationStatus.CLEANING, "Type": self.transformationTypes},
148+
columns=["TransformationID", "Author", "AuthorGroup"],
148149
)
149150
if res["OK"]:
150151
for transDict in res["Value"]:
@@ -161,7 +162,10 @@ def execute(self):
161162
self.log.error("Failed to get transformations", res["Message"])
162163

163164
# Obtain the transformations in RemovingFiles status and removes the output files
164-
res = self.transClient.getTransformations({"Status": "RemovingFiles", "Type": self.transformationTypes})
165+
res = self.transClient.getTransformations(
166+
{"Status": "RemovingFiles", "Type": self.transformationTypes},
167+
columns=["TransformationID", "Author", "AuthorGroup"],
168+
)
165169
if res["OK"]:
166170
for transDict in res["Value"]:
167171
if self.shifterProxy:
@@ -183,6 +187,7 @@ def execute(self):
183187
{"Status": TransformationStatus.COMPLETED, "Type": self.transformationTypes},
184188
older=olderThanTime,
185189
timeStamp="LastUpdate",
190+
columns=["TransformationID", "Author", "AuthorGroup"],
186191
)
187192
if res["OK"]:
188193
for transDict in res["Value"]:
@@ -230,7 +235,10 @@ def finalize(self):
230235
return res
231236
transformationIDs = res["Value"]
232237
if transformationIDs:
233-
res = self.transClient.getTransformations({"TransformationID": transformationIDs})
238+
res = self.transClient.getTransformations(
239+
{"TransformationID": transformationIDs},
240+
columns=["TransformationID", "Status", "Author", "AuthorGroup", "Type"],
241+
)
234242
if not res["OK"]:
235243
self.log.error("Failed to get transformations", res["Message"])
236244
return res

0 commit comments

Comments
 (0)