This commit is contained in:
Ask Solem 2011-03-28 17:06:44 +02:00
parent 1a09b41d19
commit 8a11832a07
2 changed files with 10 additions and 8 deletions

View File

@ -48,9 +48,9 @@ class BrokerConnection(object):
``amqplib``, ``pika``, ``redis``, ``memory``. ``amqplib``, ``pika``, ``redis``, ``memory``.
:keyword connect_timeout: Timeout in seconds for connecting to the :keyword connect_timeout: Timeout in seconds for connecting to the
server. May not be suported by the specified transport. server. May not be suported by the specified transport.
:keyword transport_options: A dict of additional connection arguments to pass to :keyword transport_options: A dict of additional connection arguments to
alternate kombu channel implementations (useful for things like SQLAlchemy pass to alternate kombu channel implementations. Consult the transport
engine arguments) documentation for available options.
**Usage** **Usage**
@ -81,7 +81,8 @@ class BrokerConnection(object):
def __init__(self, hostname="localhost", userid="guest", def __init__(self, hostname="localhost", userid="guest",
password="guest", virtual_host="/", port=None, insist=False, password="guest", virtual_host="/", port=None, insist=False,
ssl=False, transport=None, connect_timeout=5, backend_cls=None, transport_options={}): ssl=False, transport=None, connect_timeout=5, backend_cls=None,
transport_options={}, **kwargs):
self.hostname = hostname self.hostname = hostname
self.userid = userid self.userid = userid
self.password = password self.password = password

View File

@ -105,7 +105,8 @@ class test_Connection_With_Broker_Args(unittest.TestCase):
} }
def setUp(self): def setUp(self):
self.conn = BrokerConnection(port=5672, transport=Transport, transport_options=self._extra_args) self.conn = BrokerConnection(port=5672, transport=Transport,
transport_options=self._extra_args)
def test_establish_connection(self): def test_establish_connection(self):
conn = self.conn conn = self.conn