IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 14, 2009, 11:24:13 AM (17 years ago)
Author:
bills
Message:

use cleaned instead of purged for cleaning up magicDSRuns

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ipp_cleanup.pl

    r25835 r25837  
    190190            # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
    191191            my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
    192             $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
     192            $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
    193193            ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    194194                run(command => $command, verbose => $verbose);
     
    309309        # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
    310310        my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
    311         $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
     311        $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
    312312        ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    313313            run(command => $command, verbose => $verbose);
     
    444444            # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
    445445            my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
    446             $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
     446            $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
    447447            ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    448448                run(command => $command, verbose => $verbose);
     
    580580            # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
    581581            my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
    582             $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
     582            $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
    583583            ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    584584                run(command => $command, verbose => $verbose);
     
    732732            # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
    733733            my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
    734             $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
     734            $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
    735735            ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    736736                run(command => $command, verbose => $verbose);
  • trunk/ippScripts/scripts/magic_destreak_cleanup.pl

    r25822 r25837  
    106106
    107107
    108 &my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_purged";
    109 &my_die("purge not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";
     108&my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_cleaned";
     109&my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";
    110110
    111111
     
    210210
    211211if (!$no_update) {
    212     my $result = $dbh->do("UPDATE magicDSRun SET state = 'purged' WHERE magic_ds_id = ?", undef, $magic_ds_id);
     212    my $result = $dbh->do("UPDATE magicDSRun SET state = 'cleaned' WHERE magic_ds_id = ?", undef, $magic_ds_id);
    213213    my_die("attempt to update magicDSRun failed", $magic_ds_id, $PS_EXIT_UNKNOWN_ERROR) if $result eq "0E0";
    214214} else {
     
    246246    $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
    247247
    248     my $command = "$magicdstool -updaterun -set_state purge_fault.$exit_code";
     248    my $command = "$magicdstool -updaterun -fault $exit_code";
    249249    $command   .= " -magic_ds_id $magic_ds_id";
    250250    $command   .= " -dbname $dbname" if defined $dbname;
    251251
    252252    # Add the processed file to the database
    253     unless (1 or $no_update) {
     253    unless ($no_update) {
    254254        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    255255            run(command => $command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.