-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break the rabbit URL into its component variables #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected param comment in one of the helper functions - otherwise looks useful!
NB. these changes will impact at least the following:
app/rabbit_helper.py
Outdated
exchange_name=RABBIT_EXCHANGE, | ||
queue_name=RABBIT_QUEUE, | ||
queue_args=RABBIT_QUEUE_ARGS): | ||
""" | ||
Initialise connection to rabbitmq | ||
|
||
:param rabbitmq_amqp: The amqp (url) of the rabbitmq connection | ||
:param parameters: The CollectionParameters for the connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameters
doesn't exist in init_rabbitmq
parameter list?
parameters = pika.ConnectionParameters(RABBIT_HOST, RABBIT_PORT, RABBIT_VIRTUALHOST, credentials) | ||
|
||
logger.debug('Connecting to rabbitmq', url=parameters.host) | ||
return pika.BlockingConnection(parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Can be merged once these are merged: |
Codecov Report
@@ Coverage Diff @@
## master #22 +/- ##
==========================================
+ Coverage 96.61% 96.72% +0.11%
==========================================
Files 4 4
Lines 118 122 +4
==========================================
+ Hits 114 118 +4
Misses 4 4
Continue to review full report at Codecov.
|
Motivation and Context
Currently the only way to set the RabbitMQ connection variables is via the compond URL parameters. This isn't ideal for when we'll want to be able to pull in the username and password from Kubernetes secrets.
What has changed
Breaks out the Rabbit URL into its component parameters.
How to test?
make test