Ensure all jobs send a completion packet

In the job handler, aborted jobs would never send a work_complete
packet, which would cause the gearman server to track them
indefinitely.  Update the handler so that all jobs send either
a work_complete or work_exception.

Change-Id: Ia3b914762d46b1873888d5025e4ba86f9d042895
This commit is contained in:
James E. Blair 2016-04-08 15:55:56 -07:00
parent d31b5d9710
commit b8b253cfaf
1 changed files with 2 additions and 3 deletions

View File

@ -121,8 +121,7 @@ class SubunitRetriever(threading.Thread):
# discarded by zuul. # discarded by zuul.
subunit_io = self._retrieve_subunit_v2(source_url, retry) subunit_io = self._retrieve_subunit_v2(source_url, retry)
if not subunit_io: if not subunit_io:
job.sendWorkException( raise Exception('Unable to retrieve subunit stream')
'Unable to retrieve subunit stream'.encode('utf8'))
else: else:
if subunit_io.closed: if subunit_io.closed:
logging.debug("Pushing closed subunit file: %s" % logging.debug("Pushing closed subunit file: %s" %