@@ -166,15 +166,6 @@ def _getRemotePilotOutput(self, pilotReference, pilotDict):
166166 # return res, correct or not
167167 return res
168168
169- ##############################################################################
170-
171- types_storePilotOutput = [str , str , str ]
172-
173- @classmethod
174- def export_storePilotOutput (cls , pilotReference , output , error ):
175- """Store the pilot output and error"""
176- return cls .pilotAgentsDB .storePilotOutput (pilotReference , output , error )
177-
178169 ##############################################################################
179170 types_getPilotLoggingInfo = [str ]
180171
@@ -227,16 +218,6 @@ def export_getPilotSummary(cls, startdate="", enddate=""):
227218
228219 # --------------- Moved to DiracX ---------------
229220
230- types_selectPilots = [dict ]
231-
232- @classmethod
233- def export_selectPilots (cls , condDict ):
234- """Select pilots given the selection conditions"""
235- # Used by no one
236- return cls .pilotAgentsDB .selectPilots (condDict )
237-
238- #############################################
239-
240221 types_getGroupedPilotSummary = [list ]
241222
242223 @classmethod
@@ -250,46 +231,6 @@ def export_getGroupedPilotSummary(cls, columnList):
250231 """
251232 return cls .pilotAgentsDB .getGroupedPilotSummary (columnList )
252233
253- types_countPilots = [dict ]
254-
255- @classmethod
256- def export_countPilots (cls , condDict , older = None , newer = None , timeStamp = "SubmissionTime" ):
257- """Count pilots"""
258- # Used by no one
259- return cls .pilotAgentsDB .countPilots (condDict , older , newer , timeStamp )
260-
261- types_getCurrentPilotCounters = [dict ]
262-
263- @classmethod
264- def export_getCurrentPilotCounters (cls , attrDict = {}):
265- """Get pilot counters per Status with attrDict selection. Final statuses are given for
266- the last day.
267- """
268- # Used by no one
269-
270- result = cls .pilotAgentsDB .getCounters ("PilotAgents" , ["Status" ], attrDict , timeStamp = "LastUpdateTime" )
271- if not result ["OK" ]:
272- return result
273- last_update = datetime .datetime .utcnow () - TimeUtilities .day
274- resultDay = cls .pilotAgentsDB .getCounters (
275- "PilotAgents" , ["Status" ], attrDict , newer = last_update , timeStamp = "LastUpdateTime"
276- )
277- if not resultDay ["OK" ]:
278- return resultDay
279-
280- resultDict = {}
281- for statusDict , count in result ["Value" ]:
282- status = statusDict ["Status" ]
283- resultDict [status ] = count
284- if status in PilotStatus .PILOT_FINAL_STATES :
285- resultDict [status ] = 0
286- for statusDayDict , ccount in resultDay ["Value" ]:
287- if status == statusDayDict ["Status" ]:
288- resultDict [status ] = ccount
289- break
290-
291- return S_OK (resultDict )
292-
293234 #############################################
294235 types_addPilotReferences = [list , str ]
295236
@@ -302,46 +243,6 @@ def export_addPilotReferences(cls, pilotStamps, VO, gridType="DIRAC", pilotRefDi
302243
303244 return cls .pilotAgentsDB .addPilotReferences (pilot_references , VO , gridType , pilot_stamp_dict )
304245
305- #############################################
306- types_setJobForPilot = [[str , int ], str ]
307-
308- @classmethod
309- def export_setJobForPilot (cls , jobID , pilotRef , destination = None ):
310- """Report the DIRAC job ID which is executed by the given pilot job"""
311- # Used by no one.
312-
313- result = cls .pilotAgentsDB .setJobForPilot (int (jobID ), pilotRef )
314- if not result ["OK" ]:
315- return result
316- result = cls .pilotAgentsDB .setCurrentJobID (pilotRef , int (jobID ))
317- if not result ["OK" ]:
318- return result
319- if destination :
320- result = cls .pilotAgentsDB .setPilotDestinationSite (pilotRef , destination )
321-
322- return result
323-
324- #############################################
325- types_setPilotBenchmark = [str , float ]
326-
327- @classmethod
328- def export_setPilotBenchmark (cls , pilotRef , mark ):
329- """Set the pilot agent benchmark"""
330- # Used by no one.
331- return cls .pilotAgentsDB .setPilotBenchmark (pilotRef , mark )
332-
333- #############################################
334- types_setAccountingFlag = [str ]
335-
336- @classmethod
337- def export_setAccountingFlag (cls , pilotRef , flag = "True" ):
338- """Set the pilot AccountingSent flag"""
339- # Used by no one
340- return cls .pilotAgentsDB .setAccountingFlag (pilotRef , mark )
341-
342- #############################################
343- types_setPilotStatus = [str , str ]
344-
345246 @classmethod
346247 def export_setPilotStatus (cls , pilotRef , status , destination = None , reason = None , gridSite = None , queue = None ):
347248 """Set the pilot agent status"""
@@ -355,7 +256,7 @@ def export_setPilotStatus(cls, pilotRef, status, destination=None, reason=None,
355256
356257 @classmethod
357258 def export_deletePilots (cls , pilotIDs ):
358- # Used by no one.
259+ # Used by no one. We keep it for tests.
359260 if isinstance (pilotIDs , str ):
360261 return cls .pilotAgentsDB .deletePilot (pilotIDs )
361262
@@ -373,13 +274,6 @@ def export_deletePilots(cls, pilotIDs):
373274
374275 return S_OK ()
375276
376- #############################################
377- types_clearPilots = [int , int ]
378-
379- @classmethod
380- def export_clearPilots (cls , interval = 30 , aborted_interval = 7 ):
381- return cls .pilotAgentsDB .clearPilots (interval , aborted_interval )
382-
383277 #############################################
384278 types_getPilots = [[str , int ]]
385279
0 commit comments