@@ -380,63 +380,6 @@ def getJobPilotOutput(self, jobID, directory=""):
380380 self .log .always (f"Outputs retrieved in { outputPath } " )
381381 return result
382382
383- #############################################################################
384- def getPilotOutput (self , gridReference , directory = "" ):
385- """Retrieve the pilot output (std.out and std.err) for an existing pilot reference.
386-
387- >>> gLogger.notice(dirac.getJobPilotOutput(12345))
388- {'OK': True, 'Value': {}}
389-
390- :param str gridReference: pilot reference
391- :param str directory: a directory to download logs to.
392- :return: S_OK,S_ERROR
393- """
394- if not isinstance (gridReference , str ):
395- return self ._errorReport ("Expected string for pilot reference" )
396-
397- if not directory :
398- directory = self .currentDir
399-
400- if not os .path .exists (directory ):
401- return self ._errorReport (f"Directory { directory } does not exist" )
402-
403- result = PilotManagerClient ().getPilotOutput (gridReference )
404- if not result ["OK" ]:
405- return result
406-
407- gridReferenceSmall = gridReference .split ("/" )[- 1 ]
408- if not gridReferenceSmall :
409- gridReferenceSmall = "reference"
410- outputPath = f"{ directory } /pilot_{ gridReferenceSmall } "
411-
412- if os .path .exists (outputPath ):
413- self .log .info (f"Remove { outputPath } and retry to continue" )
414- return S_ERROR (f"Remove { outputPath } and retry to continue" )
415-
416- if not os .path .exists (outputPath ):
417- self .log .verbose (f"Creating directory { outputPath } " )
418- os .mkdir (outputPath )
419-
420- outputs = result ["Value" ]
421- if "StdOut" in outputs :
422- stdout = f"{ outputPath } /std.out"
423- with open (stdout , "w" ) as fopen :
424- fopen .write (outputs ["StdOut" ])
425- self .log .info (f"Standard output written to { stdout } " )
426- else :
427- self .log .warn ("No standard output returned" )
428-
429- if "StdErr" in outputs :
430- stderr = f"{ outputPath } /std.err"
431- with open (stderr , "w" ) as fopen :
432- fopen .write (outputs ["StdErr" ])
433- self .log .info (f"Standard error written to { stderr } " )
434- else :
435- self .log .warn ("No standard error returned" )
436-
437- self .log .always (f"Outputs retrieved in { outputPath } " )
438- return result
439-
440383 #############################################################################
441384 def getPilotInfo (self , gridReference ):
442385 """Retrieve info relative to a pilot reference
@@ -490,22 +433,6 @@ def killPilot(self, gridReference):
490433
491434 return killPilotsInQueues (pilotRefDict )
492435
493- #############################################################################
494- def getPilotLoggingInfo (self , gridReference ):
495- """Retrieve the pilot logging info for an existing job in the WMS.
496-
497- >>> gLogger.notice(dirac.getPilotLoggingInfo(12345))
498- {'OK': True, 'Value': {"The output of the command"}}
499-
500- :param gridReference: Gridp pilot job reference Id
501- :type gridReference: string
502- :return: S_OK,S_ERROR
503- """
504- if not isinstance (gridReference , str ):
505- return self ._errorReport ("Expected string for pilot reference" )
506-
507- return PilotManagerClient ().getPilotLoggingInfo (gridReference )
508-
509436 #############################################################################
510437 def getJobPilots (self , jobID ):
511438 """Extract the list of submitted pilots and their status for a given
0 commit comments