mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #8644 from cro/change_jid_include_default
Change the default for jid_include for the scheduler to True
This commit is contained in:
commit
6dd31c3831
@ -98,8 +98,10 @@ class Schedule(object):
|
||||
# Check to see if there are other jobs with this
|
||||
# signature running. If there are more than maxrunning
|
||||
# jobs present then don't start another.
|
||||
# If jid_include is not set for this job we can ignore all this
|
||||
if 'jid_include' in data and data['jid_include']:
|
||||
# If jid_include is False for this job we can ignore all this
|
||||
# NOTE--jid_include defaults to True, thus if it is missing from the data
|
||||
# dict we treat it like it was there and is True
|
||||
if 'jid_include' not in data or data['jid_include']:
|
||||
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)
|
||||
@ -124,7 +126,7 @@ class Schedule(object):
|
||||
|
||||
ret['pid'] = os.getpid()
|
||||
|
||||
if 'jid_include' in data and data['jid_include']:
|
||||
if 'jid_include' not in data or data['jid_include']:
|
||||
log.debug('schedule.handle_func: adding this job to the jobcache '
|
||||
'with data {0}'.format(ret))
|
||||
# write this to /var/cache/salt/minion/proc
|
||||
@ -229,9 +231,10 @@ class Schedule(object):
|
||||
else:
|
||||
log.debug('Running scheduled job: {0}'.format(job))
|
||||
|
||||
if 'jid_include' in data:
|
||||
if 'jid_include' not in data or data['jid_include']:
|
||||
data['jid_include'] = True
|
||||
log.debug('schedule: This job was scheduled with jid_include, '
|
||||
'adding to cache')
|
||||
'adding to cache (jid_include defaults to True)')
|
||||
if 'maxrunning' in data:
|
||||
log.debug('schedule: This job was scheduled with a max '
|
||||
'number of {0}'.format(data['maxrunning']))
|
||||
|
Loading…
Reference in New Issue
Block a user