- Timestamp:
- Oct 21, 2010, 2:45:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/pstamp/scripts/pstamp_webrequest.pl
r29124 r29515 26 26 my $dbname; 27 27 my $dbserver; 28 my $project;29 my $job_type;30 28 31 29 GetOptions( 32 'job_type=s' => \$job_type,33 30 'dbname=s' => \$dbname, 34 31 'dbserver=s' => \$dbserver, 35 'project=s' => \$project,36 32 'verbose' => \$verbose, 37 33 ); … … 42 38 print "\n\n"; 43 39 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;51 40 } 52 41 … … 105 94 } 106 95 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 done111 ###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 it125 print @$stdout_buf;126 print @$stderr_buf;127 exit 1;128 }129 }130 131 96 # Queue the request 132 97 my $req_id = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
