mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Adding the ability to have a job run immediately after a skip_during_range has finished.
This commit is contained in:
parent
66ce508a93
commit
6da25648cb
@ -1530,6 +1530,19 @@ class Schedule(object):
|
|||||||
log.error('Invalid date string for end in skip_during_range. Ignoring job {0}.'.format(job))
|
log.error('Invalid date string for end in skip_during_range. Ignoring job {0}.'.format(job))
|
||||||
log.error(data)
|
log.error(data)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Check to see if we should run the job immediately
|
||||||
|
# after the skip_during_range is over
|
||||||
|
if 'run_after_skip_range' in data and \
|
||||||
|
data['run_after_skip_range']:
|
||||||
|
if 'run_explicit' not in data:
|
||||||
|
data['run_explicit'] = []
|
||||||
|
# Add a run_explicit for immediately after the
|
||||||
|
# skip_during_range ends
|
||||||
|
_run_immediate = end + self.opts['loop_interval']
|
||||||
|
if _run_immediate not in data['run_explicit']:
|
||||||
|
data['run_explicit'].append(_run_immediate)
|
||||||
|
|
||||||
if end > start:
|
if end > start:
|
||||||
if start <= now <= end:
|
if start <= now <= end:
|
||||||
if self.skip_function:
|
if self.skip_function:
|
||||||
|
Loading…
Reference in New Issue
Block a user