IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 18, 2011, 2:37:40 PM (14 years ago)
Author:
heather
Message:

adds an additional check to minidvodb_merge - if faulted minidvodbProcessed
runs exist for a given minidvodb merge, exit out and don't merge

File:
1 edited

Legend:

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

    r31028 r32712  
    9393    if (defined $mergedvodbReal) {
    9494
    95         #this is chopped into several parts:  addstar, relphot, dvoverify, merge
    96 
     95        #this is chopped into several parts: firstcheck, addstar, relphot, dvoverify, merge
     96       
     97        #first check that there were no faulted merges before. If there are, fault this merge with PS_EXIT_UNKNOWN_ERROR
     98        {
     99            my $nothing_faulted = 0;
     100            my $mdcParser = PS::IPP::Metadata::Config->new;
     101
     102            my $command = "$addtool -listminidvodbprocessed -faulted -minidvodb_group " . $minidvodb_group;
     103            $command .= " -dbname $dbname" if defined $dbname;
     104
     105            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     106                    run(command => $command, verbose => $verbose);
     107            &my_die( "Unable to get list of faulted minidvodbs", $minidvodb_id, $PS_EXIT_SYS_ERROR) unless $success;
     108            if (scalar @$stdout_buf == 0 ) { #it lists nothing if nothign has faulted
     109                $nothing_faulted =1;
     110                print "previous merges are okay.\n";
     111            }
     112            &my_die( "Previous merges faulted, do not proceed until they are investigated:", $minidvodb_group, $PS_EXIT_UNKNOWN_ERROR) unless $nothing_faulted;
     113
     114
     115 
     116        }
    97117
    98118        #addstar
Note: See TracChangeset for help on using the changeset viewer.