From fbeaa50588b9ba4b0f614e520e31051c08d9ecb6 Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Tue, 9 Feb 2016 15:03:06 -0500 Subject: [PATCH] Add kombu patch for reconnect issue Adding kombu patch for reconnect issue. Patch is from https://github.com/celery/kombu/pull/569/ re #1635 https://pulp.plan.io/issues/1635 --- deps/python-kombu/569.patch | 37 +++++++++++++++++++++++++++++ deps/python-kombu/python-kombu.spec | 4 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 deps/python-kombu/569.patch diff --git a/deps/python-kombu/569.patch b/deps/python-kombu/569.patch new file mode 100644 index 0000000000..45d890fba9 --- /dev/null +++ b/deps/python-kombu/569.patch @@ -0,0 +1,37 @@ +From 6115b1a9be4de41f2c7cbb855405bfd60eff81fc Mon Sep 17 00:00:00 2001 +From: Brian Bouterse +Date: Tue, 9 Feb 2016 14:37:09 -0500 +Subject: [PATCH] Adds asynchronous error handling to Qpid transport + +Fixes #568 +--- + kombu/transport/qpid.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/kombu/transport/qpid.py b/kombu/transport/qpid.py +index b458d32..081c6c6 100644 +--- a/kombu/transport/qpid.py ++++ b/kombu/transport/qpid.py +@@ -1437,6 +1437,9 @@ def verify_runtime_environment(self): + def _qpid_session_ready(self): + os.write(self._w, '0') + ++ def _qpid_exception(self, obj_with_exception): ++ os.write(self._w, 'e') ++ + def on_readable(self, connection, loop): + """Handle any messages associated with this Transport. + +@@ -1594,6 +1597,12 @@ def establish_connection(self): + conn.client = self.client + self.session = conn.get_qpid_connection().session() + self.session.set_message_received_handler(self._qpid_session_ready) ++ conn.get_qpid_connection().set_exception_notify_handler( ++ self._qpid_exception ++ ) ++ self.session.set_exception_notify_handler( ++ self._qpid_exception ++ ) + return conn + + def close_connection(self, connection): diff --git a/deps/python-kombu/python-kombu.spec b/deps/python-kombu/python-kombu.spec index 0c6322d296..db72a76a61 100644 --- a/deps/python-kombu/python-kombu.spec +++ b/deps/python-kombu/python-kombu.spec @@ -11,7 +11,7 @@ Name: python-%{srcname} # The Fedora package is using epoch 1, so we need to also do that to make sure ours gets installed Epoch: 1 Version: 3.0.33 -Release: 2.pulp%{?dist} +Release: 3.pulp%{?dist} Summary: AMQP Messaging Framework for Python Group: Development/Languages @@ -21,6 +21,7 @@ URL: http://pypi.python.org/pypi/%{srcname} Source0: http://pypi.python.org/packages/source/k/%{srcname}/%{srcname}-%{version}.tar.gz Patch0: 563.patch Patch1: 1212200.patch +Patch2: 569.patch BuildArch: noarch BuildRequires: python2-devel @@ -118,6 +119,7 @@ This subpackage is for python3 %endif %patch0 -p1 +%patch2 -p1 # manage requirements on rpm base sed -i 's/>=1.0.13,<1.1.0/>=1.3.0/' requirements/default.txt