Skip to content

Commit 4c1bf62

Browse files
committed
feat: PilotAgentsDB: remove ParentID
1 parent c4a4143 commit 4c1bf62

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

src/DIRAC/Interfaces/scripts/dirac_admin_get_job_pilots.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 39, 10),
1818
'OutputReady': 'True',
1919
'OwnerGroup': '/biomed',
20-
'ParentID': 0L,
2120
'PilotID': 2247L,
2221
'PilotJobReference': 'https://marlb.in2p3.fr:9000/biq6KT45Q',
2322
'PilotStamp': '',

src/DIRAC/Interfaces/scripts/dirac_admin_get_pilot_info.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 49, 14),
1717
'OutputReady': 'False',
1818
'OwnerGroup': '/biomed',
19-
'ParentID': 0L,
2019
'PilotID': 2241L,
2120
'PilotJobReference': 'https://marlb.in2p3.fr:9000/2KHFrQjkw',
2221
'PilotStamp': '',

src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def clearPilots(self, interval=30, aborted_interval=7):
262262
return S_OK(idList)
263263

264264
##########################################################################################
265-
def getPilotInfo(self, pilotRef=False, parentId=False, conn=False, paramNames=[], pilotID=False):
265+
def getPilotInfo(self, pilotRef=False, conn=False, paramNames=[], pilotID=False):
266266
"""Get all the information for the pilot job reference or reference list"""
267267

268268
parameters = (
@@ -273,7 +273,6 @@ def getPilotInfo(self, pilotRef=False, parentId=False, conn=False, paramNames=[]
273273
"Status",
274274
"DestinationSite",
275275
"BenchMark",
276-
"ParentID",
277276
"OutputReady",
278277
"AccountingSent",
279278
"SubmissionTime",
@@ -290,7 +289,10 @@ def getPilotInfo(self, pilotRef=False, parentId=False, conn=False, paramNames=[]
290289

291290
cmd = f"SELECT {', '.join(parameters)} FROM PilotAgents"
292291
condSQL = []
293-
for key, value in [("PilotJobReference", pilotRef), ("PilotID", pilotID), ("ParentID", parentId)]:
292+
for key, value in [
293+
("PilotJobReference", pilotRef),
294+
("PilotID", pilotID),
295+
]:
294296
resList = []
295297
for v in value if isinstance(value, list) else [value] if value else []:
296298
result = self._escapeString(v)
@@ -309,8 +311,6 @@ def getPilotInfo(self, pilotRef=False, parentId=False, conn=False, paramNames=[]
309311
msg = "No pilots found"
310312
if pilotRef:
311313
msg += f" for PilotJobReference(s): {pilotRef}"
312-
if parentId:
313-
msg += f" with parent id: {parentId}"
314314
return S_ERROR(DErrno.EWMSNOPILOT, msg)
315315

316316
resDict = {}
@@ -1087,7 +1087,6 @@ def getPilotMonitorWeb(self, selectDict, sortList, startItem, maxItems):
10871087
"Status",
10881088
"DestinationSite",
10891089
"BenchMark",
1090-
"ParentID",
10911090
"SubmissionTime",
10921091
"PilotID",
10931092
"LastUpdateTime",

src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ CREATE TABLE `PilotAgents` (
4343
`LastUpdateTime` DATETIME DEFAULT NULL,
4444
`Status` VARCHAR(32) NOT NULL DEFAULT 'Unknown',
4545
`StatusReason` VARCHAR(255) NOT NULL DEFAULT 'Unknown',
46-
`ParentID` INT(11) UNSIGNED NOT NULL DEFAULT 0,
4746
`OutputReady` ENUM('True','False') NOT NULL DEFAULT 'False',
4847
`AccountingSent` ENUM('True','False') NOT NULL DEFAULT 'False',
4948
PRIMARY KEY (`PilotID`),

0 commit comments

Comments
 (0)