mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
f00b5f91b3
commit
1d7892421e
2 changed files with 8 additions and 7 deletions
|
@ -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…
Add table
Reference in a new issue