~wgrant/gpgservice:slave-db

Last commit made on 2016-08-11
Get this branch:
git clone -b slave-db https://git.launchpad.net/~wgrant/gpgservice
Only William Grant can upload to this branch. If you are William Grant please log in for upload directions.

Branch merges

Branch information

Name:
slave-db
Repository:
lp:~wgrant/gpgservice

Recent commits

71214f3... by William Grant

Handle master DB outages nicely in the webapp.

GET and HEAD requests fall back to a slave, and all other requests log the
error and fail with a 503.

fe18a6f... by William Grant

Add X-GPGService-Database request and response headers.

0b2a502... by William Grant

Add basic slave support with gpgservice.database.select_and_connect.

a06191d... by William Grant

gpgservice.database.create_engine -> create_engines.

Now returns a dict of engines, currently only 'master'.

295fe5b... by William Grant

Replace individual DB config variables with an SQLAlchemy URL.

e63b842... by William Grant

Return the DB engine from create_flask_application.

The test suite assumed that create_engine() given the same config as
the app would connect to the same database, but that's not the case
when using in-memory SQLite.

7f2f602... by William Grant

Fix DB schema creation on SQLite.

8b9b831... by William Grant

Lint.

f52e25c... by William Grant

Remove unused global.

4ecd17d... by William Grant

Remove database.engine global in preparation for multiple DBs.

database.create_engine() now returns the engine rather than setting a
module-global. It made tests confusing and prevented usage of multiple engines
in a single app.