Return a dict in redis_return.get_jids.

which was fixed in #28654, but broken by #30571
This commit is contained in:
jizhilong 2016-02-01 10:12:51 +08:00
parent e202ce1ce0
commit 4df037ca58

View File

@ -173,10 +173,17 @@ def get_fun(fun):
def get_jids():
'''
Return a list of all job ids
Return a dict mapping all job ids to job information
'''
serv = _get_serv(ret=None)
return list(serv.keys('load:*'))
ret = {}
for s in serv.mget(serv.keys('load:*')):
if s is None:
continue
load = json.loads(s)
jid = load['jid']
ret[jid] = salt.utils.jid.format_jid_instance(jid, load)
return ret
def get_minions():