Do not override jid on returners, only sending back to master

This commit is contained in:
Pablo Suárez Hernández 2018-05-04 09:34:13 +01:00
parent 291d3d3bd8
commit f079939500
No known key found for this signature in database
GPG key ID: A9683F02B512C911

View file

@ -941,11 +941,13 @@ class Schedule(object):
else:
# Send back to master so the job is included in the job list
mret = ret.copy()
mret['jid'] = 'req'
if data.get('return_job') == 'nocache':
# overwrite 'req' to signal to master that
# this job shouldn't be stored
mret['jid'] = 'nocache'
# No returners defined, so we're only sending back to the master
if not data_returner and not self.schedule_returner:
mret['jid'] = 'req'
if data.get('return_job') == 'nocache':
# overwrite 'req' to signal to master that
# this job shouldn't be stored
mret['jid'] = 'nocache'
load = {'cmd': '_return', 'id': self.opts['id']}
for key, value in six.iteritems(mret):
load[key] = value