[rt-devel] frob to config.pm - read-only mode
Bruce Campbell
bruce_campbell at ripe.net
Wed Apr 17 07:09:57 EDT 2002
Hey Jesse, can we add a specific frob to config.pm which indicates whether
the database that we're using is in read-only mode? The idea being that
eventually all operations which perform updates can check this first and
fail in the code, rather than the much extra overhead of checking the
database return code for success ?
Something like:
$DatabaseMode="read-only"; # Don't attempt any write operations
$DatabaseMode="read-write"; # Can attempt read and write operations
And the check in the code would be:
if( $RT::DatabaseMode =~ /write/i ){
# Perform write operations;
}
if( $RT::DatabaseMode =~ /read/i ){
# Perform read operations;
}
--
Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations
More information about the Rt-devel
mailing list