Skip to content

Commit

Permalink
Merge pull request #25591 from garethgreenaway/25560_2015_8_schedule_…
Browse files Browse the repository at this point in the history
…return_data

Return data for scheduled jobs in 2015.8 default to True.
  • Loading branch information
Mike Place committed Jul 21, 2015
2 parents 12b8fd0 + c5b94e9 commit 50c331c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions salt/utils/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,16 @@
jid_include: True
maxrunning: 1
By default, data about jobs runs from the Salt scheduler is not returned to the
master. Because of this information for these jobs will not be listed in the
:py:func:`jobs.list_jobs <salt.runners.jobs.list_jobs>` runner. The
``return_job`` parameter will return the data back to the Salt master, making
the job available in this list.
By default, data about jobs runs from the Salt scheduler is returned to the
master. Setting the ``return_job`` parameter to False will prevent the data
from being sent back to the Salt master.
.. versionadded:: 2015.5.0
schedule:
job1:
function: scheduled_job_function
return_job: True
return_job: False
It can be useful to include specific data to differentiate a job from other
jobs. Using the metadata parameter special values can be associated with
Expand Down Expand Up @@ -695,7 +693,9 @@ def handle_func(self, func, data):
)
)

if 'return_job' in data and data['return_job']:
if 'return_job' in data and not data['return_job']:
pass
else:
# Send back to master so the job is included in the job list
mret = ret.copy()
mret['jid'] = 'req'
Expand Down

0 comments on commit 50c331c

Please sign in to comment.