Changeset 34447 for trunk/pstamp/scripts/pstampparse.pl
- Timestamp:
- Sep 18, 2012, 3:52:27 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r33670 r34447 93 93 my $fields_output; 94 94 { 95 my $command = "echo $request_file_name | $fields -x 0 EXTNAME EXTVER REQ_NAME ";95 my $command = "echo $request_file_name | $fields -x 0 EXTNAME EXTVER REQ_NAME ACTION USER EMAIL"; 96 96 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 97 97 run(command => $command, verbose => $verbose); … … 102 102 $fields_output = join "", @$stdout_buf; 103 103 } 104 my (undef, $extname, $extver, $req_name ) = split " ", $fields_output;104 my (undef, $extname, $extver, $req_name, $action, $username, $email) = split " ", $fields_output; 105 105 106 106 # make sure the file contains what we are expecting … … 109 109 my_die("$request_file_name is not a PS1_PS_REQEST", $PS_EXIT_PROG_ERROR) if $extname ne "PS1_PS_REQUEST"; 110 110 my_die("REQ_NAME not found in $request_file_name", $PS_EXIT_PROG_ERROR) if (!$req_name); 111 my_die("wrong EXTVER $extver found in $request_file_name", $PS_EXIT_PROG_ERROR) if ($extver ne "1" );111 my_die("wrong EXTVER $extver found in $request_file_name", $PS_EXIT_PROG_ERROR) if ($extver ne "1" and $extver ne "2"); 112 112 113 113 … … 230 230 # the images of interest for this new row doesn't match the list. 231 231 # process the list ... 232 $num_jobs += processRows( \@rowList);232 $num_jobs += processRows($action, \@rowList); 233 233 234 234 # and reset the list to contain just the new row … … 238 238 # out of rows process the list 239 239 if (scalar @rowList > 0) { 240 $num_jobs += processRows( \@rowList);241 } 242 243 if (($ mode eq "queue_job") and ($num_jobs eq 0)) {240 $num_jobs += processRows($action, \@rowList); 241 } 242 243 if (($action eq 'LIST' or $mode eq "queue_job") and ($num_jobs eq 0)) { 244 244 print STDERR "no jobs created for $req_name\n" if $verbose; 245 245 insertFakeJobForRow(undef, 0, $PSTAMP_INVALID_REQUEST); … … 387 387 } 388 388 389 sub processRows {389 sub list_targets { 390 390 my $rowList = shift; 391 391 my $num_jobs = 0; 392 393 $num_jobs = 1; 394 return $num_jobs; 395 } 396 397 sub processRows { 398 my $action = shift; 399 my $rowList = shift; 400 my $num_jobs = 0; 401 402 if ($action eq 'LIST') { 403 return list_targets($rowList); 404 } 392 405 393 406 # all rows in the list are compatible
Note:
See TracChangeset
for help on using the changeset viewer.
