IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2009, 10:51:23 AM (17 years ago)
Author:
eugene
Message:

empty runs (no processed imfiles) goto state of new

File:
1 edited

Legend:

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

    r23277 r23323  
    8686        &my_die("Unable to perform chiptool: $error_code", "chip", $stage_id, $error_code);
    8787    }
     88
     89    # if there are no chipProcessedImfiles (@$stdout_buf == 0), the reset the state to 'new'
     90    if (@$stdout_buf == 0)  {
     91        my $command = "$chiptool -chip_id $stage_id -updaterun -set_state new";
     92        $command .= " -dbname $dbname" if defined $dbname;
     93
     94        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     95            run(command => $command, verbose => $verbose);
     96        unless ($success) {
     97            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     98            &my_die("Unable to perform chiptool: $error_code", "chip", $stage_id, $error_code);
     99        }
     100        exit 0;
     101    }
     102
    88103    my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
    89104        &my_die("Unable to parse metadata config doc", "chip", $stage_id, $PS_EXIT_PROG_ERROR);
Note: See TracChangeset for help on using the changeset viewer.