← Back to team overview

launchpad-dev team mailing list archive

Re: Connections left open after switching to read only mode

 

On Fri, May 7, 2010 at 12:56 AM, Guilherme Salgado
<salgado@xxxxxxxxxxxxx> wrote:

> We could do what you suggest, but that'd require teaching the librarian
> about read-only stores as well, as I think we're using the read-only.txt
> file to switch the librarian mode as well (although for the librarian we
> need a restart). We may need to do similar changes on other services
> that have access the DB, but I'm not sure if there's any.

That just means we need to make the default database policy
(MasterDatabasePolicy) aware of read-only.txt and hand out the desired
Stores, or install a ReadOnlyModeDatabasePolicy on startup if
read-only.txt exists. Everything in Launchpad retrieves its stores via
the IStoreSelector and the currently installed IDatabasePolicy so this
should work fine.



-- 
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/



Follow ups

References