

def get_jids_filter(count, filter_find_job=True):
    "\n    Return a list of all job ids\n    :param int count: show not more than the count of most recent jobs\n    :param bool filter_find_jobs: filter out 'saltutil.find_job' jobs\n    "
    with _get_serv(ret=None, commit=True) as cur:
        sql = 'SELECT * FROM (\n                     SELECT DISTINCT `jid` ,`load` FROM `jids`\n                     {0}\n                     ORDER BY `jid` DESC limit {1}\n                     ) `tmp`\n                 ORDER BY `jid`;'
        where = 'WHERE `load` NOT LIKE \'%"fun": "saltutil.find_job"%\' '
        cur.execute(where.format((where if filter_find_job else ''), count))
        data = cur.fetchall()
        ret = []
        for jid in data:
            ret.append(salt.utils.jid.format_jid_instance_ext(jid[0], json.loads(jid[1])))
        return ret

dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py get_jids_filter/VarMisuse@44/236 `sql`->`where`