def tail( self, job ): lineList, outbox = PDF_Local.tail( self ) # Remove last lines (completion times) for local jobs lineList = lineList[ : -4 ] # Remove tarball from outbox, as this is to be uploaded to storage element outbox.remove( "media.tar.gz" ) gridUrl = os.path.join( job.outputdata.getGridStorage(), "media.tar.gz" ) lineList.extend\ ( [ "", "UPLOAD_START_TIME=\\", "%s" % ptime, "edg-gridftp-mkdir --parents %s" % os.path.dirname( gridUrl ), "globus-url-copy file:${WORKDIR}/media.tar.gz %s" % gridUrl, "UPLOAD_END_TIME=\\", "%s" % ptime, "", "echo \"Upload_start: ${UPLOAD_START_TIME}\" >> ${RUN_DATA}", "echo \"Upload_end: ${UPLOAD_END_TIME}\" >> ${RUN_DATA}", "JOB_END_TIME=\\", "%s" % ptime, "echo \"Job_end: ${JOB_END_TIME}\" >> ${RUN_DATA}", "echo \"End time: $(date)\"", ] ) return ( lineList, outbox )
def tail(self, job): lineList, outbox = PDF_Local.tail(self) # Remove last lines (completion times) for local jobs lineList = lineList[:-4] # Remove tarball from outbox, as this is to be uploaded to storage element outbox.remove("media.tar.gz") gridUrl = os.path.join(job.outputdata.getGridStorage(), "media.tar.gz") lineList.extend\ ( [ "", "UPLOAD_START_TIME=\\", "%s" % ptime, "edg-gridftp-mkdir --parents %s" % os.path.dirname( gridUrl ), "globus-url-copy file:${WORKDIR}/media.tar.gz %s" % gridUrl, "UPLOAD_END_TIME=\\", "%s" % ptime, "", "echo \"Upload_start: ${UPLOAD_START_TIME}\" >> ${RUN_DATA}", "echo \"Upload_end: ${UPLOAD_END_TIME}\" >> ${RUN_DATA}", "JOB_END_TIME=\\", "%s" % ptime, "echo \"Job_end: ${JOB_END_TIME}\" >> ${RUN_DATA}", "echo \"End time: $(date)\"", ] ) return (lineList, outbox)