Changeset 30546
- Timestamp:
- Feb 9, 2011, 12:15:52 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/ipp_cleanup.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/ipp_cleanup.pl
r30319 r30546 207 207 } 208 208 209 # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same. 210 my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool"; 211 $command = "$magicdstool -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned -set_label goto_cleaned"; 212 $command .= " -dbname $dbname" if defined $dbname; 213 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 214 run(command => $command, verbose => $verbose); 215 unless ($success) { 216 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 217 &my_die("Unable to perform magicdstool: $error_code", "$stage", $stage_id, $error_code); 218 } 209 set_destreak_goto_cleaned(); 219 210 220 211 } else { … … 324 315 } 325 316 326 # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same. 327 my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool"; 328 $command = "$magicdstool -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned -set_label goto_cleaned"; 329 $command .= " -dbname $dbname" if defined $dbname; 330 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 331 run(command => $command, verbose => $verbose); 332 unless ($success) { 333 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 334 &my_die("Unable to perform magicdstool: $error_code", "$stage", $stage_id, $error_code); 335 } 317 set_destreak_goto_cleaned(); 336 318 337 319 } else { … … 469 451 } 470 452 471 # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same. 472 my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool"; 473 $command = "$magicdstool -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned -set_label goto_cleaned"; 474 $command .= " -dbname $dbname" if defined $dbname; 475 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 476 run(command => $command, verbose => $verbose); 477 unless ($success) { 478 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 479 &my_die("Unable to perform magicdstool: $error_code", "$stage", $stage_id, $error_code); 480 } 453 set_destreak_goto_cleaned(); 481 454 482 455 } else { … … 603 576 } 604 577 605 # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same. 606 my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool"; 607 $command = "$magicdstool -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned -set_label goto_cleaned"; 608 $command .= " -dbname $dbname" if defined $dbname; 609 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 610 run(command => $command, verbose => $verbose); 611 unless ($success) { 612 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 613 &my_die("Unable to perform magicdstool: $error_code", "$stage", $stage_id, $error_code); 614 } 578 set_destreak_goto_cleaned(); 615 579 616 580 } else { … … 759 723 } 760 724 761 # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same. 762 my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool"; 763 $command = "$magicdstool -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned -set_label goto_cleaned"; 764 $command .= " -dbname $dbname" if defined $dbname; 765 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 766 run(command => $command, verbose => $verbose); 767 unless ($success) { 768 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 769 &my_die("Unable to perform magicdstool: $error_code", "$stage", $stage_id, $error_code); 770 } 725 set_destreak_goto_cleaned(); 771 726 772 727 } else { … … 2062 2017 } 2063 2018 2019 # this gets set to 1 the first time we set the corresponding destreak run to be cleaned 2020 my $ds_done = 0; 2021 sub set_destreak_goto_cleaned { 2022 2023 return if $ds_done; 2024 2025 # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same. 2026 my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool"; 2027 my $command = "$magicdstool -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned -set_label goto_cleaned"; 2028 $command .= " -dbname $dbname" if defined $dbname; 2029 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 2030 run(command => $command, verbose => $verbose); 2031 unless ($success) { 2032 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 2033 &my_die("Unable to perform magicdstool: $error_code", "$stage", $stage_id, $error_code); 2034 } 2035 $ds_done = 1; 2036 } 2037 2064 2038 # XXX we currently do not set the error state in the db on my_die 2065 2039 sub my_die
Note:
See TracChangeset
for help on using the changeset viewer.
