Changeset 29383
- Timestamp:
- Oct 12, 2010, 2:59:53 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_webrequest.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_webrequest.pl
r29382 r29383 26 26 my $dbname; 27 27 my $dbserver; 28 my $job_type;29 28 30 29 GetOptions( … … 39 38 print "\n\n"; 40 39 print "Starting script $0 on $host\n\n"; 41 }42 43 my $listMode;44 if ($job_type and ($job_type eq 'list_uri')) {45 $listMode=1;46 } else {47 $listMode=0;48 40 } 49 41 … … 102 94 } 103 95 104 # ok at this point we have a request file add it to the database (unless we're in listMode)105 if ($listMode == 1 ) {106 ###107 ### In list mode just parse the file print the output and we're done108 ###109 my $command = "$pstampparse --mode list_uri --file $request_file";110 $command .= " --dbname $dbname" if $dbname;111 $command .= " --dbserver $dbserver" if $dbserver;112 $command .= " --verbose" if $verbose;113 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =114 run(command => $command, verbose => $verbose);115 116 if ($success) {117 ### print "Matching Images:\n";118 print @$stdout_buf;119 exit 0;120 } else {121 # we send the output to STDOUT because that's where PHP finds it122 print @$stdout_buf;123 print @$stderr_buf;124 exit 1;125 }126 }127 128 96 # Queue the request 129 97 my $req_id = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
