IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 20, 2012, 12:21:48 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120601/ippScripts/scripts/nightly_science.pl

    r33863 r34047  
    3232    exit($PS_EXIT_CONFIG_ERROR);
    3333}
     34
     35## for DB connection, want to use siteConfig DB settings
     36my $ipprc =  PS::IPP::Config->new(); # IPP Configuration
     37my $siteConfig = $ipprc->{_siteConfig};
    3438
    3539my $db;
     
    20522056
    20532057sub init_gpc_db {
     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';
    20542068    use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
    2055     my $dbserver = 'ippdb01';
    2056     my $dbuser = 'ippuser';
    2057     my $dbpass = 'ippuser';
    20582069    $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" .
    20592070                       "mysql_socket=" . DB_SOCKET(),
Note: See TracChangeset for help on using the changeset viewer.