IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 11, 2011, 2:49:34 PM (15 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ippScripts/scripts/ipp_cleanup.pl

    r30446 r30579  
    207207            }
    208208
    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();
    219210
    220211        } else {
     
    324315        }
    325316
    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();
    336318
    337319    } else {
     
    469451            }
    470452
    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();
    481454
    482455         } else {
     
    603576            }
    604577
    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();
    615579
    616580        } else {
     
    759723            }
    760724
    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();
    771726
    772727        } else {
     
    20622017}
    20632018
     2019# this gets set to 1 the first time we set the corresponding destreak run to be cleaned
     2020my $ds_done = 0;
     2021sub 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
    20642038# XXX we currently do not set the error state in the db on my_die
    20652039sub my_die
Note: See TracChangeset for help on using the changeset viewer.