Skip to content

Commit 748fd36

Browse files
authored
Merge pull request #8162 from chaen/v9.0_fix_getTransformationsFilesCount
V9.0 fix get transformations files count
2 parents 4fc7171 + 2c7e363 commit 748fd36

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/DIRAC/TransformationSystem/Agent/TransformationCleaningAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def __submitRemovalRequests(self, lfns, transID=0):
684684

685685
for index, lfnList in enumerate(breakListIntoChunks(lfns, 300)):
686686
oRequest = Request()
687-
requestName = "TCA_{transID}_{index}_{md5(repr(time.time()).encode()).hexdigest()[:5]}"
687+
requestName = f"TCA_{transID}_{index}_{md5(repr(time.time()).encode()).hexdigest()[:5]}"
688688
oRequest.RequestName = requestName
689689
oOperation = Operation()
690690
oOperation.Type = "RemoveFile"

src/DIRAC/TransformationSystem/Client/TransformationClient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Class that contains client access to the transformation DB handler. """
1+
"""Class that contains client access to the transformation DB handler."""
22

33
from DIRAC import S_OK, S_ERROR, gLogger
44
from DIRAC.Core.Base.Client import Client, createClient
@@ -62,8 +62,8 @@ def __init__(self, **kwargs):
6262
super().__init__(**kwargs)
6363
opsH = Operations()
6464
self.maxResetCounter = opsH.getValue("Transformations/FilesMaxResetCounter", 10)
65-
66-
self.setServer("Transformation/TransformationManager")
65+
if "url" not in kwargs:
66+
self.setServer("Transformation/TransformationManager")
6767

6868
def setServer(self, url):
6969
self.serverURL = url

src/DIRAC/TransformationSystem/DB/TransformationDB.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
""" DIRAC Transformation DB
1+
"""DIRAC Transformation DB
22
3-
Transformation database is used to collect and serve the necessary information
4-
in order to automate the task of job preparation for high level transformations.
5-
This class is typically used as a base class for more specific data processing
6-
databases
3+
Transformation database is used to collect and serve the necessary information
4+
in order to automate the task of job preparation for high level transformations.
5+
This class is typically used as a base class for more specific data processing
6+
databases
77
"""
88

99
import re
@@ -706,7 +706,7 @@ def getTransformationFilesCount(self, transName, field, selection=None, connecti
706706
res = self.getCounters("TransformationFiles", ["TransformationID", field], selection)
707707
if not res["OK"]:
708708
return res
709-
countDict = {attrDict[field]: count for attrDict, count in res["Value"]}
709+
countDict = {str(attrDict[field]): count for attrDict, count in res["Value"]}
710710
countDict["Total"] = sum(countDict.values())
711711
return S_OK(countDict)
712712

0 commit comments

Comments
 (0)