IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37349


Ignore:
Timestamp:
Sep 2, 2014, 5:18:28 PM (12 years ago)
Author:
watersc1
Message:

Do checks on the image files, and if they don't exist, automatically fail the component.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_chip.pl

    r37340 r37349  
    2626
    2727my $fail_state = "prep_fail";
     28my $hard_fail_state = "fail";
    2829
    2930# Look for programs we need
     
    195196
    196197        # Process the image and burntool table
    197         my ($ipp_uri, $remote_uri) = uri_to_outputs_raw($uri);
     198        # IMAGE CHECK: Look up the image location, prove it exists, and if not, abort the prep for this object.
     199        my ($ipp_uri, $remote_uri) = uri_convert($uri);
     200        unless (-e $ipp_uri) {
     201            # This image file is missing, so it will require manual intervention.
     202            &my_die("Required image file $ipp_uri ($chip_id, $class_id) not found.  Stopping this prep.",
     203                    $remote_id,$chip_id,$PS_EXIT_CONFIG_ERROR,$hard_fail_state);
     204        }
     205
     206        # The image exists, so continue.  This resets the variables, but also outputs the file locations.
     207        ($ipp_uri, $remote_uri) = uri_to_outputs_raw($uri);
    198208        my $btt = $uri;
    199209        $btt =~ s/fits$/burn.tbl/;
     
    212222           
    213223            unless (-e $ipp_btt) {
    214                 &my_die("Attempted regeneration of burntool table has failed.  Stopping everything.", $remote_id,$chip_id, $PS_EXIT_CONFIG_ERROR, $fail_state);
     224                &my_die("Attempted regeneration of burntool table ($chip_id, $class_id) has failed.  Stopping this prep.",
     225                        $remote_id,$chip_id, $PS_EXIT_CONFIG_ERROR, $hard_fail_state);
    215226            }
    216227        }
Note: See TracChangeset for help on using the changeset viewer.