diff --git a/docs/source/AdministratorGuide/Systems/WorkloadManagement/JobsMatching.rst b/docs/source/AdministratorGuide/Systems/WorkloadManagement/JobsMatching.rst index 7a64dd5d54d..23c294610f5 100644 --- a/docs/source/AdministratorGuide/Systems/WorkloadManagement/JobsMatching.rst +++ b/docs/source/AdministratorGuide/Systems/WorkloadManagement/JobsMatching.rst @@ -40,7 +40,7 @@ An example of requirements include the following:: JobRequirements = [ - OwnerDN = "/some/DN/"; + Owner = "user_x"; VirtualOrganization = "VO"; Setup = "VO-Certification"; CPUTime = 17800; diff --git a/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py b/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py index e013a55cab8..426ead0872e 100755 --- a/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py +++ b/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py @@ -1,8 +1,8 @@ """ TaskQueueDB class is a front-end to the task queues db """ -from collections import defaultdict import random import string +from collections import defaultdict from typing import Any from DIRAC import S_ERROR, S_OK, gConfig @@ -97,7 +97,6 @@ def __initializeDB(self): "Fields": { "TQId": "INTEGER(11) UNSIGNED AUTO_INCREMENT NOT NULL", "Owner": "VARCHAR(255) NOT NULL", - "OwnerDN": "VARCHAR(255)", "OwnerGroup": "VARCHAR(32) NOT NULL", "VO": "VARCHAR(32) NOT NULL", "CPUTime": "BIGINT(20) UNSIGNED NOT NULL", @@ -1151,7 +1150,7 @@ def __setPrioritiesForEntity(self, user, userGroup, share, connObj=False, consol res = self._escapeString(user) if not res["OK"]: return res - userDN = res["Value"] + user = res["Value"] tqCond.append(f"t.Owner= {user} ") tqCond.append("t.TQId = j.TQId") if consolidationFunc == "AVG": diff --git a/src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py b/src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py index 64fcc985cad..0c6fb395281 100755 --- a/src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py +++ b/src/DIRAC/WorkloadManagementSystem/Service/SandboxStoreHandler.py @@ -616,7 +616,7 @@ def __deleteSandboxFromExternalBackend(self, SEName, SEPFN): result = self.sandboxDB.getSandboxOwner(SEName, SEPFN, hostDN, "hosts") if not result["OK"]: return result - owner, _ownerDN, ownerGroup = result["Value"] + owner, ownerGroup = result["Value"] request = Request() request.RequestName = f"RemoteSBDeletion:{SEName}|{SEPFN}:{time.time()}"