mysociety/popit — pull request #614 by struan (2014-09-03 13:42:27+00:00)
Title: Decouple instance database name from slug, allow instances to be marked unavailable

This pull request deals with making performing maintenance on a popit instance's database easier.

Firstly it allows you to change the database the instance points at to make bulk imports a non-desctructive process. It does this by adding a dbname property to the instance record in the master database. If this is not present then it falls back to the slug as before. The replace_database script has been updated to use this.

This also adds middleware to check if an instance has been marked as unavailable and to return a 503 error if so, and a script to set the availability of an instance.

Both of these still require the popit server to be restarted after making the changes as settings are cached in process.