def get_jids():
    with _get_serv(ret=None, commit=True) as cur:

        sql = '''SELECT DISTINCT `jid`, `load`
                FROM `jids`'''

        cur.execute(sql)
        data = cur.fetchall()
        ret = {}
        for jid in data:
            ret[jid[0]] = salt.utils.jid.format_jid_instance(jid[0],
                                                             json.loads(jid[1]))
        return ret
Return a list of all job ids
dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py/get_jids