- Timestamp:
- Apr 19, 2013, 3:39:39 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130307/pstamp/scripts
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pstamp_parser_run.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/pstamp/scripts
- Property svn:mergeinfo changed
/trunk/pstamp/scripts merged: 35353-35354,35356,35362-35364,35366,35380,35384,35388,35396,35398,35409
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130307/pstamp/scripts/pstamp_parser_run.pl
r34232 r35412 158 158 my $request_fault = $PSTAMP_INVALID_REQUEST; 159 159 160 # default action is to process the request after parsing. This can be overridden by 161 # PREVIEW mode for pstamp requests 162 my $action = 'PROCESS'; 163 160 164 if (-r $uri) { 161 165 # run the appropriate parse command to parse the queue the jobs for this request 162 166 # first check the extension header to find the EXTNAME 163 $request_type = find_request_type($uri );167 $request_type = find_request_type($uri, \$action); 164 168 165 169 if ($request_type) { … … 240 244 241 245 if ($success) { 242 $newState = 'run'; 246 # XXX: This bit of the postage stamp request API has slipped in here because we need to control 247 # the new state of the request 248 if ($action eq 'PROCESS') { 249 $newState = 'run'; 250 } elsif ($action eq 'PREVIEW') { 251 $newState = 'parsed'; 252 } else { 253 print STDERR "WARNING Ignoring unexpected value for ACTION found in request header: $action\n"; 254 } 243 255 } else { 244 256 $fault = $error_code >> 8; … … 275 287 # find the EXTNAME in the input fits table 276 288 my $file_name = shift; 277 my $out = `echo $file_name | fields -x 0 EXTNAME`; 289 my $r_action = shift; 290 291 my $out = `echo $file_name | fields -x 0 EXTNAME ACTION`; 278 292 279 293 if ($out) { 280 294 # output from fields is filename value 281 my ($dummy, $extname) = split " ", $out; 295 my ($dummy, $extname, $action) = split " ", $out; 296 297 # Set the action if it is defined in the request header 298 # XXX:consider doing this only if extname is PS1_PS_REQUSET 299 $$r_action = $action if ($action); 282 300 283 301 return $extname;
Note:
See TracChangeset
for help on using the changeset viewer.
