Default maxrunning to 1 for scheduled jobs.

This commit is contained in:
C. R. Oldham 2013-11-15 11:11:08 -07:00
parent 1bf94644e3
commit 7c0141bb72

View File

@ -22,6 +22,8 @@ The scheduler also supports ensuring that there are no more than N copies of
a particular routine running. Use this for jobs that may be long-running
and could step on each other or pile up in case of infrastructure outage.
The default for maxrunning is 1.
code-block:: yaml
schedule:
@ -233,6 +235,10 @@ class Schedule(object):
if 'maxrunning' in data:
log.debug('schedule: This job was scheduled with a max '
'number of {0}'.format(data['maxrunning']))
else:
log.info('schedule: maxrunning parameter was not specified for '
'job {0}, defaulting to 1.'.format(job))
data['maxrunning'] = 1
if self.opts.get('multiprocessing', True):
thread_cls = multiprocessing.Process