IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33052


Ignore:
Timestamp:
Jan 9, 2012, 1:43:55 PM (14 years ago)
Author:
bills
Message:

if -tofullimfile fails wait 10 seconds and try again. Appaerntly during updates we trigger a deadlock and
this works around it

File:
1 edited

Legend:

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

    r32562 r33052  
    147147my $outputBin2;
    148148my $dump_config = 1;
     149my $do_stats = 1;
     150$outputStats   = prepare_output("PPIMAGE.STATS",         $outroot, $class_id, 1);
    149151my $do_binned_images = 1;
    150152if ($run_state eq 'new') {
    151153    # prepare the files that are only created for a new run
    152154    $configuration = prepare_output("PPIMAGE.CONFIG",        $outroot, $class_id, 1);
    153     $outputStats   = prepare_output("PPIMAGE.STATS",         $outroot, $class_id, 1);
    154155} else {
    155156    $configuration = $ipprc->filename('PPIMAGE.CONFIG', $outroot, $class_id)
     
    196197unless ($no_op) {
    197198    my $command;
    198     my $do_stats;
    199199
    200200    ## get the ppImage recipe for this camera and CHIP reduction
     
    470470        $command .= " -Db PPIMAGE:PHOTOM FALSE";
    471471    }
    472     if ($run_state eq "new") {
     472    if ($run_state eq "new" or $do_stats) {
    473473        $command .= " -recipe PPSTATS CHIPSTATS";
    474474        $command .= " -stats $outputStats";
     
    562562
    563563# Add the processed file to the database
    564 unless ($no_update) {
    565     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    566         run(command => $command, verbose => $verbose);
    567     unless ($success) {
    568         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    569         warn("Unable to perform chiptool -addprocessedimfile: $error_code\n");
    570         exit($error_code);
    571     }
    572 } else {
    573     print "skipping command: $command\n";
     564my $tries = 0;
     565while (1) {
     566    $tries++;
     567    unless ($no_update) {
     568        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     569            run(command => $command, verbose => $verbose);
     570        unless ($success) {
     571            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     572            warn("Unable to perform chiptool -addprocessedimfile: $error_code\n");
     573            exit($error_code) if $tries >= 3;
     574            warn("Waiting 10 seconds to try again\n");
     575            sleep 10;
     576        } else {
     577            last;
     578        }
     579    } else {
     580        print "skipping command: $command\n";
     581        last;
     582    }
    574583}
    575584
Note: See TracChangeset for help on using the changeset viewer.