mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
b2937b6a16
commit
03afa3cffa
1 changed files with 5 additions and 1 deletions
|
@ -577,7 +577,11 @@ def find_cached_job(jid):
|
|||
proc_dir = os.path.join(__opts__['cachedir'], 'minion_jobs')
|
||||
job_dir = os.path.join(proc_dir, str(jid))
|
||||
if not os.path.isdir(job_dir):
|
||||
return
|
||||
if not __opts__.get('cache_jobs'):
|
||||
return ('Local jobs cache directory not found; you may need to'
|
||||
' enable cache_jobs on this minion')
|
||||
else:
|
||||
return 'Local jobs cache directory {0} not found'.format(job_dir)
|
||||
path = os.path.join(job_dir, 'return.p')
|
||||
with salt.utils.fopen(path, 'rb') as fp_:
|
||||
buf = fp_.read()
|
||||
|
|
Loading…
Add table
Reference in a new issue