Changeset 35364 for trunk/pstamp/scripts/pstamp_parser_run.pl
- Timestamp:
- Apr 4, 2013, 1:09:34 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_parser_run.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_parser_run.pl
r34232 r35364 158 158 my $request_fault = $PSTAMP_INVALID_REQUEST; 159 159 160 my $action = 'PROCESS'; 161 160 162 if (-r $uri) { 161 163 # run the appropriate parse command to parse the queue the jobs for this request 162 164 # first check the extension header to find the EXTNAME 163 $request_type = find_request_type($uri );165 $request_type = find_request_type($uri, \$action); 164 166 165 167 if ($request_type) { … … 240 242 241 243 if ($success) { 242 $newState = 'run'; 244 if ($action eq 'PROCESS') { 245 $newState = 'run'; 246 } elsif ($action eq 'PREVIEW') { 247 $newState = 'parsed'; 248 } else { 249 print STDERR "WARNING Ignoring unexpected value for ACTION found in request header: $action\n"; 250 } 243 251 } else { 244 252 $fault = $error_code >> 8; … … 275 283 # find the EXTNAME in the input fits table 276 284 my $file_name = shift; 277 my $out = `echo $file_name | fields -x 0 EXTNAME`; 285 my $r_action = shift; 286 287 my $out = `echo $file_name | fields -x 0 EXTNAME ACTION`; 278 288 279 289 if ($out) { 280 290 # output from fields is filename value 281 my ($dummy, $extname) = split " ", $out; 291 my ($dummy, $extname, $action) = split " ", $out; 292 293 $$r_action = $action if ($action); 282 294 283 295 return $extname;
Note:
See TracChangeset
for help on using the changeset viewer.
