Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ def recalculateTQSharesForEntity(self, user, userGroup, connObj=False):
# If group has JobSharing just set prio for that entry, user is irrelevant
return self.__setPrioritiesForEntity(user, userGroup, share, connObj=connObj)

selSQL = f"SELECT Owner, COUNT(Owner) FROM `tq_TaskQueues` WHERE OwnerGroup='{userGroup}' GROUP BY Owner"
selSQL = f"SELECT Owner, COUNT(Owner) FROM `tq_TaskQueues` WHERE OwnerGroup={userGroup} GROUP BY Owner"
result = self._query(selSQL, conn=connObj)
if not result["OK"]:
return result
Expand Down Expand Up @@ -1275,7 +1275,7 @@ def __setPrioritiesForEntity(self, user, userGroup, share, connObj=False, consol
Set the priority for a user/userGroup combo given a splitted share
"""
self.log.info("Setting priorities", f"to {user}@{userGroup} TQs")
tqCond = [f"t.OwnerGroup='{userGroup}'"]
tqCond = [f"t.OwnerGroup={userGroup}"]
allowBgTQs = gConfig.getValue(f"/Registry/Groups/{userGroup}/AllowBackgroundTQs", False)
if Properties.JOB_SHARING not in Registry.getPropertiesForGroup(userGroup):
res = self._escapeString(user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ def test_TQ(tq_cleanup):
"Jobs": 1,
"OwnerGroup": "myGroup",
"CPUTime": 86400,
"Priority": 1.0,
"Priority": 1000.0,
}
result = tqDB.findOrphanJobs()
assert result["OK"]
Expand Down
Loading