IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 21, 2010, 2:45:13 PM (16 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823/pstamp/scripts/pstamp_webrequest.pl

    r29124 r29515  
    2626my $dbname;
    2727my $dbserver;
    28 my $project;
    29 my $job_type;
    3028
    3129GetOptions(
    32     'job_type=s'    =>  \$job_type,
    3330    'dbname=s'      =>  \$dbname,
    3431    'dbserver=s'    =>  \$dbserver,
    35     'project=s'     => \$project,
    3632    'verbose'       => \$verbose,
    3733);
     
    4238    print "\n\n";
    4339    print "Starting script $0 on $host\n\n";
    44 }
    45 
    46 my $listMode;
    47 if ($job_type and ($job_type eq 'list_uri')) {
    48     $listMode=1;
    49 } else  {
    50     $listMode=0;
    5140}
    5241
     
    10594}
    10695
    107 # ok at this point we have a request file add it to the database (unless we're in listMode)
    108 if ($listMode == 1 ) {
    109     ###
    110     ### In list mode just parse the file print the output and we're done
    111     ###
    112     my $command = "$pstampparse --mode list_uri --file $request_file";
    113     $command .= " --dbname $dbname" if $dbname;
    114     $command .= " --dbserver $dbserver" if $dbserver;
    115     $command .= " --verbose" if $verbose;
    116     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    117         run(command => $command, verbose => $verbose);
    118 
    119     if ($success) {
    120         ### print "Matching Images:\n";
    121         print @$stdout_buf;
    122         exit 0;
    123     } else {
    124         # we send the output to STDOUT because that's where PHP finds it
    125         print @$stdout_buf;
    126         print @$stderr_buf;
    127         exit 1;
    128     }
    129 }
    130 
    13196# Queue the request
    13297my $req_id = 0;
Note: See TracChangeset for help on using the changeset viewer.