Closed davewongillies closed 10 years ago
Thanks for this. I haven't yet read this code, because there are no tests. Please let me know if I've somehow missed them. Otherwise, I'll review and write tests myself at some point, unless someone else does so first.
@bkjones is there any support for SSL right now?
EDIT: Nevermind, I found it in the latest commit (unreleased to pypi), something like this:
def _get_rabbit_connection():
"""Helper giving us a rabbit connection from settings.BROKER_URL"""
host_with_port = "{}:{}".format(settings.RABBITMQ_HOST, settings.RABBITMQ_MANAGEMENT_PORT)
if settings.SSL_CERTIFICATE:
scheme = 'https'
else:
scheme = 'http'
return Client(host_with_port, settings.RABBITMQ_DEFAULT_USER, settings.RABBITMQ_DEFAULT_PASS, scheme=scheme)
Added
ssl
andssl_verify
parameters to thepyrabbit.api.Client
andpyrabbit.http.HTTPClient
functions. Set using a boolean value.