Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def __submitRemovalRequests(self, lfns, transID=0):

for index, lfnList in enumerate(breakListIntoChunks(lfns, 300)):
oRequest = Request()
requestName = "TCA_{transID}_{index}_{md5(repr(time.time()).encode()).hexdigest()[:5]}"
requestName = f"TCA_{transID}_{index}_{md5(repr(time.time()).encode()).hexdigest()[:5]}"
oRequest.RequestName = requestName
oOperation = Operation()
oOperation.Type = "RemoveFile"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Class that contains client access to the transformation DB handler. """
"""Class that contains client access to the transformation DB handler."""

from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Base.Client import Client, createClient
Expand Down Expand Up @@ -62,8 +62,8 @@ def __init__(self, **kwargs):
super().__init__(**kwargs)
opsH = Operations()
self.maxResetCounter = opsH.getValue("Transformations/FilesMaxResetCounter", 10)

self.setServer("Transformation/TransformationManager")
if "url" not in kwargs:
self.setServer("Transformation/TransformationManager")

def setServer(self, url):
self.serverURL = url
Expand Down
12 changes: 6 additions & 6 deletions src/DIRAC/TransformationSystem/DB/TransformationDB.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
""" DIRAC Transformation DB
"""DIRAC Transformation DB

Transformation database is used to collect and serve the necessary information
in order to automate the task of job preparation for high level transformations.
This class is typically used as a base class for more specific data processing
databases
Transformation database is used to collect and serve the necessary information
in order to automate the task of job preparation for high level transformations.
This class is typically used as a base class for more specific data processing
databases
"""

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

Expand Down
Loading