def ReadCronJobRun(self, job_id, run_id, cursor=None):
    """Reads a single cron job run from the db."""
    query = ("SELECT run, UNIX_TIMESTAMP(write_time) FROM cron_job_runs "
             "WHERE job_id = %s AND run_id = %s")
    num_runs = cursor.execute(
        query, [job_id, db_utils.CronJobRunIDToInt(run_id)])
    if num_runs == 0:
      raise db.UnknownCronJobRunError(
          "Run with job id %s and run id %s not found." % (job_id, run_id))

    return self._CronJobRunFromRow(cursor.fetchall()[0])
def ReadCronJobRun ( self , job_id , run_id , cursor = None ) : query = ( "SELECT run, UNIX_TIMESTAMP(write_time) FROM cron_job_runs " "WHERE job_id = %s AND run_id = %s" ) num_runs = cursor . execute ( query , [ job_id , db_utils . CronJobRunIDToInt ( run_id ) ] ) if num_runs == 0 : raise db . UnknownCronJobRunError ( "Run with job id %s and run id %s not found." % ( job_id , run_id ) ) return self . _CronJobRunFromRow ( cursor . fetchall ( ) [ 0 ] )
Reads a single cron job run from the db.