Changeset 35364 for trunk/pstamp/scripts/pstampparse.pl
- Timestamp:
- Apr 4, 2013, 1:09:34 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r35363 r35364 411 411 412 412 if ($action eq 'LIST') { 413 # LIST is not allowed by caller. Can't get here. 413 414 return list_targets($rowList); 414 415 } … … 516 517 $row->{need_magic} = $need_magic; 517 518 518 $num_jobs += queueJobs($ mode, \@rowList, $imageList);519 $num_jobs += queueJobs($action, \@rowList, $imageList); 519 520 520 521 # if a row slipped through with no jobs add a faulted one … … 538 539 my $image = shift; 539 540 my $need_magic = shift; 540 my $ mode= shift;541 my $action = shift; 541 542 542 543 my $rownum = $row->{ROWNUM}; … … 621 622 write_params($output_base, $image); 622 623 623 my $newState = "run";624 my $newState = $action eq 'PROCESS' ? "run" : "parsed"; 624 625 my $fault = 0; 625 626 my $dep_id; 626 627 627 queueUpdatesIfNeeded($ stage, $image, $option_mask, \$newState, \$fault, \$dep_id);628 queueUpdatesIfNeeded($action, $stage, $image, $option_mask, \$newState, \$fault, \$dep_id); 628 629 629 630 my $command = "$pstamptool -addjob -req_id $req_id -job_type $row->{JOB_TYPE}" … … 654 655 sub queueJobs 655 656 { 656 my $ mode= shift;657 my $action = shift; 657 658 my $rowList = shift; 658 659 my $imageList = shift; … … 674 675 my_die( "error: unexpected number of rows for get_image request: $n", $PS_EXIT_PROG_ERROR) if $n != 1; 675 676 676 $num_jobs = queueGetImageJobs($firstRow, $imageList, $stage, $need_magic, $ mode);677 $num_jobs = queueGetImageJobs($firstRow, $imageList, $stage, $need_magic, $action); 677 678 678 679 } else { … … 702 703 my $row = $rowList->[$i]; 703 704 704 $num_jobs += queueJobForImage($row, $stage, $image, $need_magic, $ mode);705 $num_jobs += queueJobForImage($row, $stage, $image, $need_magic, $action); 705 706 } 706 707 } … … 716 717 my $stage = shift; 717 718 my $need_magic = shift; 718 my $ mode= shift;719 my $action = shift; 719 720 720 721 my $num_jobs = 0; … … 763 764 write_params($output_base, $image); 764 765 765 my $newState = "run";766 my $newState = $action eq 'PROCESS' ? "run" : "parsed"; 766 767 my $fault = 0; 767 768 my $dep_id; 768 769 769 queueUpdatesIfNeeded($ stage, $image, $option_mask, \$newState, \$fault, \$dep_id);770 queueUpdatesIfNeeded($action, $stage, $image, $option_mask, \$newState, \$fault, \$dep_id); 770 771 771 772 $num_jobs++; … … 909 910 sub get_dependent 910 911 { 911 my ($ r_jobState, $r_fault, $r_dep_id, $imagedb, $state, $stage, $stage_id, $component, $need_magic) = @_;912 my ($action, $r_jobState, $r_fault, $r_dep_id, $imagedb, $state, $stage, $stage_id, $component, $need_magic) = @_; 912 913 913 914 # chipRun's can be in full state if destreaking is necessary … … 928 929 my $command = "$pstamptool -getdependent -stage $stage -stage_id $stage_id -imagedb $imagedb -component $component -outdir $outdir"; 929 930 $command .= " -need_magic" if $need_magic; 931 $command .= ' -hold' if $action eq 'PREVIEW'; 930 932 931 933 # compute rlabel for the run. … … 977 979 978 980 sub queueUpdatesIfNeeded { 981 my $action = shift; 979 982 my $stage = shift; 980 983 my $image = shift; … … 1026 1029 # set up to queue an update run 1027 1030 my $require_magic = ($need_magic or $image->{magicked}); 1028 get_dependent( \$$r_newState, \$$r_fault, $r_dep_id, $image->{imagedb},1031 get_dependent($action, \$$r_newState, \$$r_fault, $r_dep_id, $image->{imagedb}, 1029 1032 $run_state, $stage, $image->{stage_id}, $image->{component}, $require_magic ); 1030 1033 }
Note:
See TracChangeset
for help on using the changeset viewer.
