def hasFinished( retcode, filename, output_tag, logfile ): """check if a run has finished.""" E.info( "checking status of job %s with returncode %i" % (filename, retcode) ) if retcode != 0: try: if not output_tag or not re.search( output_tag, IOTools.getLastLine( logfile )): return False except IOError: E.warn( "could not read output_tag from files %s" % (logfile) ) return False return True
def hasFinished(retcode, filename, output_tag, logfile): """check if a run has finished.""" E.info("checking status of job %s with returncode %i" % (filename, retcode)) if retcode != 0: try: if not output_tag or not re.search(output_tag, IOTools.getLastLine(logfile)): return False except IOError: E.warn("could not read output_tag from files %s" % (logfile)) return False return True
def checkPythonRuns( filename ): """returns true if a python run is complete.""" last_line = IOTools.getLastLine( filename ) return re.match( "# job finished", last_line )
def checkPythonRuns(filename): """returns true if a python run is complete.""" last_line = IOTools.getLastLine(filename) return re.match("# job finished", last_line)