summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-04-15 23:48:51 +0000
committerGerrit Code Review <review@openstack.org>2016-04-15 23:48:51 +0000
commitb6bf50c001781b069e8accb283791aa79f1955a4 (patch)
tree129a70bf8cedfa81f1f7dd4d848ec412555a73bb
parentc078843f3134fc581901de82dc6fbfb42ffd58db (diff)
parentb8b253cfaf4525efdb34b1b285fa3e699c712a0a (diff)
Merge "Ensure all jobs send a completion packet"
-rw-r--r--files/subunit-gearman-worker.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/files/subunit-gearman-worker.py b/files/subunit-gearman-worker.py
index 5c64833..1633bc0 100644
--- a/files/subunit-gearman-worker.py
+++ b/files/subunit-gearman-worker.py
@@ -121,8 +121,7 @@ class SubunitRetriever(threading.Thread):
121 # discarded by zuul. 121 # discarded by zuul.
122 subunit_io = self._retrieve_subunit_v2(source_url, retry) 122 subunit_io = self._retrieve_subunit_v2(source_url, retry)
123 if not subunit_io: 123 if not subunit_io:
124 job.sendWorkException( 124 raise Exception('Unable to retrieve subunit stream')
125 'Unable to retrieve subunit stream'.encode('utf8'))
126 else: 125 else:
127 if subunit_io.closed: 126 if subunit_io.closed:
128 logging.debug("Pushing closed subunit file: %s" % 127 logging.debug("Pushing closed subunit file: %s" %
@@ -132,7 +131,7 @@ class SubunitRetriever(threading.Thread):
132 out_event = fields.copy() 131 out_event = fields.copy()
133 out_event["subunit"] = subunit_io 132 out_event["subunit"] = subunit_io
134 self._write_to_db(out_event) 133 self._write_to_db(out_event)
135 job.sendWorkComplete() 134 job.sendWorkComplete()
136 except Exception as e: 135 except Exception as e:
137 logging.exception("Exception handling log event.") 136 logging.exception("Exception handling log event.")
138 job.sendWorkException(str(e).encode('utf-8')) 137 job.sendWorkException(str(e).encode('utf-8'))