IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 21, 2014, 10:27:04 AM (12 years ago)
Author:
bills
Message:

Ignore convolved stack images when bundling as they are cleaned up now.
Also look for a bzipped log file if the log file is missing as they are
compressed upon cleanup now.

File:
1 edited

Legend:

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

    r36223 r36457  
    5050                     'PPSUB.INVERSE.MASK' => 'inv_mask',
    5151                     'PPSUB.INVERSE.VARIANCE' => 'inv_variance' );
    52 my %stack_cleaned = ( 'PPSTACK.OUTPUT' => 'image',
     52
     53my %stack_cleaned = ( 'PPSTACK.UNCONV' => 'image',
     54                      'PPSTACK.UNCONV.MASK' => 'mask',
     55                      'PPSTACK.UNCONV.VARIANCE' => 'variance',
     56                      'PPSTACK.UNCONV.EXP' => 'exp',
     57                      'PPSTACK.UNCONV.EXPNUM' => 'expnum',
     58                      'PPSTACK.UNCONV.EXPWT' => 'expwt'
     59                      );
     60
     61my %stack_convolved = ( 'PPSTACK.OUTPUT' => 'image',
    5362                      'PPSTACK.OUTPUT.MASK' => 'mask',
    54                       'PPSTACK.OUTPUT.VARIANCE' => 'variance' );
     63                      'PPSTACK.OUTPUT.VARIANCE' => 'variance',
     64                      'PPSTACK.OUTPUT.EXP' => 'exp',
     65                      'PPSTACK.OUTPUT.EXPNUM' => 'expnum',
     66                      'PPSTACK.OUTPUT.EXPWT' => 'expwt'
     67                      );
    5568my %empty_cleaned = ();
     69
    5670
    5771
     
    136150if (($stage ne 'raw') and ($stage ne 'fake') and ($stage ne 'stack_summary') and !$poor_quality) {
    137151    # If the file list is empty it is an error because we should at least get a config dump file
    138     # except for fake stage which doesn't do anything yet
     152    # except for fake stage which doesn't do anything yet, stack_summary stage, and of course raw files have
     153    # no config dump because they aren't processed
    139154    &my_die("empty file list", $component, $PS_EXIT_CONFIG_ERROR) if (!scalar @$file_list);
    140155}
     
    165180    my $image_type = get_image_type($stage, $file_rule);
    166181
     182    # skip useless empty trace files
     183    next if ($file_rule =~ /TRACE/);
     184
    167185    # if this is an image and we are building a clean bundle or if quality is bad skip this rule
    168186    next if $image_type and ($clean or $poor_quality);
     187
     188    if ($stage eq 'stack') {
     189        # skip convolved stacks since they are deleted just after they are created now
     190        next if $stack_convolved{$file_rule};
     191    }
    169192
    170193    # if magic is required, don't ship jpegs or binned fits images
     
    180203
    181204    my $file_name = $file->{name};
    182     my $base = basename($file_name);
    183205    my $path = $ipprc->file_resolve($file_name);
     206
     207    if (!$path and $file_rule =~ /LOG/) {
     208        my $compressed_file_name = $file_name . '.bz2';
     209        my $compressed_path = $ipprc->file_resolve($compressed_file_name);
     210        if ($compressed_path) {
     211            $path = $compressed_path;
     212            $file_name = $compressed_file_name;
     213        }
     214    }
     215
    184216
    185217    if (!$path) {
     
    194226        # XXX: perhaps only do this for stages where we know that this happens
    195227        next if $file_rule =~ /STATS/;
    196         # don't fail on these "non-essential files"
     228        # don't fail if these "non-essential files" are missing
     229        next if $file_rule =~ /LOG/;
    197230        next if $file_rule =~ /TRACE/;
    198         next if $file_rule =~ /LOG/;
    199231        next if $file_rule =~ /BIN/;
    200232
     
    236268        # create a symbolic link from the file in the nebulous repository
    237269        # in the temporary directory
    238         symlink $path, "$tmpdir/$base";
     270        symlink $path, "$tmpdir/" . basename($file_name);
    239271    }
    240272}
Note: See TracChangeset for help on using the changeset viewer.