From afdc56b2c6f098e5d68ab8ca86dbfdc0f8b4a595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B3nimo=20Albi?= Date: Mon, 5 Sep 2016 16:54:51 +0200 Subject: [PATCH 1/2] Changed version to `1.0.0-alpha.8` --- katana/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/katana/__init__.py b/katana/__init__.py index 32cb1d9..4fd36dc 100644 --- a/katana/__init__.py +++ b/katana/__init__.py @@ -1 +1 @@ -__version__ = '1.0.0-alpha.7' +__version__ = '1.0.0-alpha.8' From 735761b8e134d99e22a40a1354ee5797781e378b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B3nimo=20Albi?= Date: Wed, 7 Sep 2016 12:05:22 +0200 Subject: [PATCH 2/2] Handled future CancelledError to avoid loging and have task cleanup --- katana/worker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/katana/worker.py b/katana/worker.py index e970f2c..2e8217b 100644 --- a/katana/worker.py +++ b/katana/worker.py @@ -142,6 +142,9 @@ def process_payload(self, payload): else: # Call callback asynchronusly component = yield from self.callback(component) + except CancelledError: + # Avoid logging task cancel errors by catching it here. + raise except Exception as exc: LOG.exception('Component failed') payload = self.create_error_payload( @@ -186,6 +189,9 @@ def process_stream(self, stream): # Process command and return payload response serialized try: payload = yield from self.process_payload(payload) + except CancelledError: + # Avoid logging task cancel errors by catching it here + raise except HTTPError as err: payload = ErrorPayload.new( status=err.status,