Changeset 34018 for trunk/ippScripts/scripts/nightly_science.pl
- Timestamp:
- Jun 15, 2012, 1:21:25 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/nightly_science.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/nightly_science.pl
r34008 r34018 32 32 exit($PS_EXIT_CONFIG_ERROR); 33 33 } 34 35 ## for DB connection, want to use siteConfig DB settings 36 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 37 my $siteConfig = $ipprc->{_siteConfig}; 34 38 35 39 my $db; … … 2052 2056 2053 2057 sub init_gpc_db { 2054 ## change to use the site.config setting, however may want to use replicated scidbs instead 2055 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 2056 my $siteConfig = $ipprc->{_siteConfig}; 2058 ## change to use the siteConfig setting, while readonly probably do not want to use a readonly replicated DB incase it gets behind 2059 my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER'); 2060 my $dbuser = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBUSER"); 2061 my $dbpass = metadataLookupStr($ipprc->{_siteConfig}, "RO_DBPASSWORD"); 2062 die "database configuration not set up" unless defined($dbserver); 2063 die "database configuration not set up" unless defined($dbuser); 2064 die "database configuration not set up" unless defined($dbpass); 2065 #my $dbserver = 'ippdb01'; 2066 #my $dbuser = 'ippuser'; 2067 #my $dbpass = 'ippuser'; 2057 2068 use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock'; 2058 # my $dbserver = 'ippdb01';2059 my $dbuser = 'ippuser';2060 my $dbpass = 'ippuser';2061 my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER');2062 die "database configuration not set up" unless defined($dbserver);2063 2069 $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" . 2064 2070 "mysql_socket=" . DB_SOCKET(),
Note:
See TracChangeset
for help on using the changeset viewer.
