mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
parent
f00b5f91b3
commit
1d7892421e
@ -2319,7 +2319,7 @@ class Syndic(Minion):
|
||||
if 'jid' not in event['data']:
|
||||
# Not a job return
|
||||
continue
|
||||
jdict = self.jids.setdefault(event['tag'], {})
|
||||
jdict = self.jids.setdefault(event['data']['jid'], {})
|
||||
if not jdict:
|
||||
jdict['__fun__'] = event['data'].get('fun')
|
||||
jdict['__jid__'] = event['data']['jid']
|
||||
|
@ -122,12 +122,13 @@ def prep_jid(nocache=False, passed_jid=None, recurse_count=0):
|
||||
|
||||
# Make sure we create the jid dir, otherwise someone else is using it,
|
||||
# meaning we need a new jid.
|
||||
try:
|
||||
os.makedirs(jid_dir_)
|
||||
except OSError:
|
||||
time.sleep(0.1)
|
||||
if passed_jid is None:
|
||||
return prep_jid(nocache=nocache, recurse_count=recurse_count+1)
|
||||
if not os.path.isdir(jid_dir_):
|
||||
try:
|
||||
os.makedirs(jid_dir_)
|
||||
except OSError:
|
||||
time.sleep(0.1)
|
||||
if passed_jid is None:
|
||||
return prep_jid(nocache=nocache, recurse_count=recurse_count+1)
|
||||
|
||||
try:
|
||||
with salt.utils.fopen(os.path.join(jid_dir_, 'jid'), 'wb+') as fn_:
|
||||
|
Loading…
Reference in New Issue
Block a user