Purge records from the returner tables.
    :param job_age_in_seconds:  Purge jobs older than this
    :return:

def _purge_jobs(timestamp):
    '''
    Purge records from the returner tables.
    :param job_age_in_seconds:  Purge jobs older than this
    :return:
    '''
    with _get_serv() as cur:
        try:
            sql = 'delete from `jids` where jid in (select distinct jid from salt_returns where alter_time < %s)'
            cur.execute(sql, (timestamp,))
            cur.execute('COMMIT')
        except MySQLdb.Error as e:
            log.error('mysql returner archiver was unable to delete contents of table \'jids\'')
            log.error(six.text_type(e))
            raise salt.exceptions.SaltRunnerError(six.text_type(e))

        try:
            sql = 'delete from `salt_returns` where alter_time < %s'
            cur.execute(sql, (timestamp,))
            cur.execute('COMMIT')
        except MySQLdb.Error as e:
            log.error('mysql returner archiver was unable to delete contents of table \'salt_returns\'')
            log.error(six.text_type(e))
            raise salt.exceptions.SaltRunnerError(six.text_type(e))

        try:
            sql = 'delete from `salt_events` where alter_time < %s'
            cur.execute(sql, (timestamp,))
            cur.execute('COMMIT')
        except MySQLdb.Error as e:
            log.error('mysql returner archiver was unable to delete contents of table \'salt_events\'')
            log.error(six.text_type(e))
            raise salt.exceptions.SaltRunnerError(six.text_type(e))

    return True