IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2009, 5:14:07 PM (17 years ago)
Author:
bills
Message:

updates to the postage stamp server to allow the postage stamp server's
database to be located on a different mysql server than the ipp.
Also some updates towards compatability with the current ipp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_parser_run.pl

    r21410 r24831  
    2020my $verbose;
    2121my $dbname;
     22my $dbserver;
    2223
    2324GetOptions(
     
    2829    'verbose'           =>  \$verbose,
    2930    'dbname=s'          =>  \$dbname,
     31    'dbserver=s'         =>  \$dbserver,
    3032);
    3133
     
    6769my $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
    6870exit ($PS_EXIT_CONFIG_ERROR) unless defined $pstamp_workdir; # lookup failure outputs a message
     71
     72if (!$dbserver) {
     73    $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
     74}
    6975
    7076# workdir is where we download request files to and place any error output from the parser
     
    167173    $command   .= " -fault $PS_EXIT_DATA_ERROR";
    168174    $command   .= " -dbname $dbname" if $dbname;
     175    $command   .= " -dbserver $dbserver" if $dbserver;
    169176    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    170177        run(command => $command, verbose => $verbose);
     
    177184$parse_cmd .= " --mode queue_job --req_id $req_id --product $product --out_dir $workdir --file $uri";
    178185$parse_cmd .= " --dbname $dbname" if $dbname;
     186$parse_cmd .= " --dbserver $dbserver" if $dbserver;
    179187$parse_cmd .= " --verbose" if $verbose;
    180188
     
    218226    $command   .= " -fault $fault" if $fault;
    219227    $command   .= " -dbname $dbname" if $dbname;
     228    $command   .= " -dbserver $dbserver" if $dbserver;
    220229    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    221230        run(command => $command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.