backporting #22226 to 2014.7

This commit is contained in:
Gareth J. Greenaway 2015-03-31 17:31:07 -07:00
parent 8b726e3310
commit 20199351e6

View File

@ -379,6 +379,11 @@ class Schedule(object):
jobcount = 0
for basefilename in os.listdir(salt.minion.get_proc_dir(self.opts['cachedir'])):
fn_ = os.path.join(salt.minion.get_proc_dir(self.opts['cachedir']), basefilename)
if not os.path.exists(fn_):
log.debug('schedule.handle_func: {0} was processed '
'in another thread, skipping.'.format(
basefilename))
continue
with salt.utils.fopen(fn_, 'r') as fp_:
job = salt.payload.Serial(self.opts).load(fp_)
if job: