mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Updating various docstrings
This commit is contained in:
parent
77c89afbb8
commit
eec7393b0c
@ -818,12 +818,13 @@ class Schedule(object):
|
||||
|
||||
def get_next_fire_time(self, name):
|
||||
'''
|
||||
Disable a job in the scheduler. Ignores jobs from pillar
|
||||
Return the next fire time for the specified job
|
||||
'''
|
||||
|
||||
schedule = self._get_schedule()
|
||||
_next_fire_time = None
|
||||
if schedule:
|
||||
_next_fire_time = schedule[name]['_next_fire_time']
|
||||
_next_fire_time = schedule.get(name, {}).get('_next_fire_time', None)
|
||||
|
||||
# Fire the complete event back along with updated list of schedule
|
||||
evt = salt.utils.event.get_event('minion', opts=self.opts, listen=False)
|
||||
@ -832,11 +833,11 @@ class Schedule(object):
|
||||
|
||||
def job_status(self, name):
|
||||
'''
|
||||
Disable a job in the scheduler. Ignores jobs from pillar
|
||||
Return the specified schedule item
|
||||
'''
|
||||
|
||||
schedule = self._get_schedule()
|
||||
return schedule[name]
|
||||
return schedule.get(name, {})
|
||||
|
||||
def handle_func(self, multiprocessing_enabled, func, data):
|
||||
'''
|
||||
|
@ -77,7 +77,7 @@ class SchedulerTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
def test_skip(self):
|
||||
'''
|
||||
verify that scheduled job runs
|
||||
verify that scheduled job is skipped at the specified time
|
||||
'''
|
||||
job = {
|
||||
'schedule': {
|
||||
@ -107,7 +107,7 @@ class SchedulerTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
def test_postpone(self):
|
||||
'''
|
||||
verify that scheduled job runs
|
||||
verify that scheduled job is postponed until the specified time.
|
||||
'''
|
||||
job = {
|
||||
'schedule': {
|
||||
@ -148,7 +148,7 @@ class SchedulerTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
def test_skip_during_range(self):
|
||||
'''
|
||||
verify that scheduled job runs
|
||||
verify that scheduled job is skipped during the specified range
|
||||
'''
|
||||
job = {
|
||||
'schedule': {
|
||||
|
Loading…
Reference in New Issue
Block a user