Common code for SDC Pika-based services that interact with RabbitMQ.
A common source code library for SDC apps that use Pika to interact with RabbitMQ.
To install, use
pip install sdc-rabbit.
Assuming you are executing from inside an activated virtual environment:
Run the unit tests
In order to run the tests you will need a copy of rabbitmq running. The easiest way of doing this is with docker with the following command:
docker run -d -p 5672:5672 rabbitmq:3-management
then to run the tests, just do:
Create a package for deployment
Test package locally
Inside of a virtual environment, this can be installed from git with the following command:
pip install git+git://github.com/ONSDigital/sdc-rabbit.git@<branch-name-here>#egg=sdc-rabbit
This repo is available in PyPi at sdc-rabbit
The package is published automatically to PyPi when a tag is created in Github. The configuration for this is in the .travis.yml file.