IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 24, 2010, 12:45:33 PM (15 years ago)
Author:
bills
Message:

if there are no components left to clean up set run state to 'cleaned'

File:
1 edited

Legend:

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

    r29573 r29829  
    130130        push @components, $comp;
    131131        $num_components++;
     132}
     133if ($num_components == 0) {
     134    # no components to clean up set run state to cleaned
     135    my $command = "$magicdstool -updaterun -magic_ds_id $magic_ds_id -set_state cleaned";
     136    $command   .= " -dbname $dbname" if defined $dbname;
     137
     138    unless ($no_update) {
     139        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     140            run(command => $command, verbose => $verbose);
     141        unless ($success) {
     142            carp("failed to update database for $magic_ds_id");
     143        }
     144    } else {
     145        print "Skipping command: $command\n";
     146    }
     147    exit 0;
    132148}
    133149
Note: See TracChangeset for help on using the changeset viewer.