Esempio n. 1
0
    def export_getJobPilotOutput(self, jobID):
        """ Get the pilot job standard output and standard error files for the DIRAC
        job reference
    """

        pilotReference = ''
        # Get the pilot grid reference first from the job parameters
        result = jobDB.getJobParameter(int(jobID), 'Pilot_Reference')
        if result['OK']:
            pilotReference = result['Value']

        if not pilotReference:
            # Failed to get the pilot reference, try to look in the attic parameters
            result = jobDB.getAtticJobParameters(int(jobID),
                                                 ['Pilot_Reference'])
            if result['OK']:
                c = -1
                # Get the pilot reference for the last rescheduling cycle
                for cycle in result['Value']:
                    if cycle > c:
                        pilotReference = result['Value'][cycle][
                            'Pilot_Reference']
                        c = cycle

        if pilotReference:
            return getGridJobOutput(pilotReference)
        return S_ERROR('No pilot job reference found')
Esempio n. 2
0
  def export_getPilotOutput(self, pilotReference):
    """ Get the pilot job standard output and standard error files for the Grid
        job reference
    """

    return getGridJobOutput(pilotReference)