Merge "Ensure all jobs send a completion packet"
This commit is contained in:
commit
b6bf50c001
|
@ -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" %
|
||||||
|
@ -132,7 +131,7 @@ class SubunitRetriever(threading.Thread):
|
||||||
out_event = fields.copy()
|
out_event = fields.copy()
|
||||||
out_event["subunit"] = subunit_io
|
out_event["subunit"] = subunit_io
|
||||||
self._write_to_db(out_event)
|
self._write_to_db(out_event)
|
||||||
job.sendWorkComplete()
|
job.sendWorkComplete()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception("Exception handling log event.")
|
logging.exception("Exception handling log event.")
|
||||||
job.sendWorkException(str(e).encode('utf-8'))
|
job.sendWorkException(str(e).encode('utf-8'))
|
||||||
|
|
Loading…
Reference in New Issue