Skip to content

Commit

Permalink
Merge pull request #7230 from chrisburr/fix-tqdb
Browse files Browse the repository at this point in the history
[8.1] Fix group to vo conversion in TaskQueueDB
  • Loading branch information
fstagni authored Oct 5, 2023
2 parents 6cdcf6c + 08ab485 commit 8f05a8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ def _checkTaskQueueDefinition(self, tqDefDict):
Check a task queue definition dict is valid
"""

if "OwnerGroup" in tqDefDict:
result = self._escapeString(Registry.getVOForGroup(tqDefDict["OwnerGroup"]))
if not result["OK"]:
return result
tqDefDict["VO"] = result["Value"]

for field in singleValueDefFields:
if field == "CPUTime":
if not isinstance(tqDefDict[field], int):
Expand Down Expand Up @@ -255,7 +261,7 @@ def __createTaskQueue(self, tqDefDict, priority=1, connObj=False):
sqlSingleFields.append(field)
sqlValues.append(tqDefDict[field])
sqlSingleFields.append("VO")
sqlValues.append(Registry.getVOForGroup(tqDefDict["OwnerGroup"]))
sqlValues.append(tqDefDict["VO"])
# Insert the TQ Disabled
sqlSingleFields.append("Enabled")
sqlValues.append("0")
Expand Down

0 comments on commit 8f05a8b

Please sign in to comment.