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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.