MetaBrainz Foundation

Remove code duplication from ListenBrainz's different modules

Don't Repeat Yourself is a principle in software development that all MetaBrainz projects try to follow as much as possible. Three different modules of ListenBrainz: bigquery-writer, influx-writer and webserver connect to RabbitMQ using similar code.

This task involves consolidating this similar code into a function which should then get called by each module when it wants to connect to RabbitMQ.

To complete this task, you should add a function that connects to RabbitMQ in listenbrainz/ and call it in each of the above places, so that we only have one piece of code to connect to RabbitMQ.

Task tags

  • python
  • rabbitmq
  • listenbrainz

Students who completed this task

Eshan Singh

Task type

  • code Code
  • done_all Quality Assurance