Skip to content

Commit

Permalink
feat: add a remote pilot option for getJobPilotOutut calls
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Jul 11, 2023
1 parent 7ef7644 commit c6ce915
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/DIRAC/Interfaces/API/DiracAdmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def resetJob(self, jobID):
return result

#############################################################################
def getJobPilotOutput(self, jobID, directory=""):
def getJobPilotOutput(self, jobID, directory="", remote=False):
"""Retrieve the pilot output for an existing job in the WMS.
The output will be retrieved in a local directory unless
otherwise specified.
Expand All @@ -441,6 +441,8 @@ def getJobPilotOutput(self, jobID, directory=""):
:param job: JobID
:type job: integer or string
:param str directory: a directory to download logs to.
:param bool remote: if True a remote storage is used, otherwise classic CE logs
:return: S_OK,S_ERROR
"""
if not directory:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@ def export_getSiteMaskSummary(cls):
##############################################################################
types_getJobPilotOutput = [[str, int]]

def export_getJobPilotOutput(self, jobID):
def export_getJobPilotOutput(self, jobID, remote=False):
"""Get the pilot job standard output and standard error files for the DIRAC
job reference
:param str jobID: job ID
:param bool remote: if True a remote storage is used, otherwise classic CE logs
:return: S_OK(dict)/S_ERROR()
"""
Expand Down Expand Up @@ -209,7 +210,7 @@ def export_getJobPilotOutput(self, jobID):
c = cycle

if pilotReference:
return self.pilotManager.getPilotOutput(pilotReference)
return self.pilotManager.getPilotOutput(pilotReference, remote=remote)
return S_ERROR("No pilot job reference found")

##############################################################################
Expand Down

0 comments on commit c6ce915

Please sign in to comment.