Add jid=req handling for mysql returner. It should also store the return jid into the jid list table.

This commit is contained in:
Dave Ye 2016-07-19 15:41:23 +10:00
parent 10a1af9949
commit 0cd55eb7d7

View file

@ -246,6 +246,11 @@ def returner(ret):
'''
Return data to a mysql server
'''
# if a minion is returning a standalone job, get a jobid
if ret['jid'] == 'req':
ret['jid'] = prep_jid(nocache=ret.get('nocache', False))
save_load(ret['jid'], ret)
try:
with _get_serv(ret, commit=True) as cur:
sql = '''INSERT INTO `salt_returns`