forked from pool/python-amqp
Accepting request 286466 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/286466 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-amqp?expand=0&rev=16
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 29 16:15:42 UTC 2015 - dmueller@suse.com
|
||||
|
||||
- replace set_socket_TCP_KEEPALIVE_and_TCP_USER_TIMEOUT.patch
|
||||
with tune-keepalive-intervals.diff (bnc#902207)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 15 07:50:41 UTC 2014 - tbechtold@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-amqp
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -26,6 +26,7 @@ Url: http://github.com/celery/py-amqp
|
||||
Source: https://pypi.python.org/packages/source/a/amqp/amqp-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE speilicke@suse.com -- Avoid excessive doc dependencies
|
||||
Patch0: amqp-drop-sphinxcontrib-issuetracker-dependency.patch
|
||||
Patch1: tune-keepalive-intervals.diff
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
# Documentation requirements:
|
||||
@@ -49,6 +50,7 @@ This library should be API compatible with librabbitmq.
|
||||
%prep
|
||||
%setup -q -n amqp-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p0
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
||||
15
tune-keepalive-intervals.diff
Normal file
15
tune-keepalive-intervals.diff
Normal file
@@ -0,0 +1,15 @@
|
||||
--- amqp/transport.py
|
||||
+++ amqp/transport.py
|
||||
@@ -98,6 +98,12 @@
|
||||
self.sock.settimeout(None)
|
||||
self.sock.setsockopt(SOL_TCP, socket.TCP_NODELAY, 1)
|
||||
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||
+ # If connection is idle for more than KEEPIDLE seconds
|
||||
+ # Start sending a probe every KEEPINTVL seconds
|
||||
+ # for KEEPCNT times. If none respond, about the connection
|
||||
+ self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPIDLE, 60)
|
||||
+ self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPINTVL, 10)
|
||||
+ self.sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPCNT, 9)
|
||||
|
||||
self._setup_transport()
|
||||
|
||||
Reference in New Issue
Block a user