IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 3, 2010, 3:47:26 PM (16 years ago)
Author:
watersc1
Message:

bugfix to hopefully prevent destreak from ruining warps before we have a chance to turn them into a stack.

File:
1 edited

Legend:

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

    r29653 r29656  
    12671267    my $stack_done_sth = "SELECT * from stackRun LEFT JOIN stackSumSkyfile USING(stack_id) WHERE $where ";
    12681268    $stack_done_sth .= " AND ((state = 'full') OR (state = 'new' && fault != 0)) ";
    1269 
     1269    if ($debug == 1) {
     1270        print STDERR "post_stack_queue: database queries:\n";
     1271        print STDERR "$stack_full_sth\n";
     1272        print STDERR "$stack_done_sth\n";
     1273    }
    12701274    my $stack_full_ref = $db->selectall_arrayref( $stack_full_sth );
    12711275    my $stack_done_ref = $db->selectall_arrayref( $stack_done_sth );
     
    12811285        if ($stackable_list{$target} == 1) {
    12821286            my ($Nstacks, $Nattempted) = post_stack_queue($date,$target);
     1287            if ($debug == 1) {
     1288                print STDERR "confirm_stacks: Target $target on $date has $Nattempted attempts on $Nstacks.\n";
     1289            }
    12831290            if ($Nstacks != $Nattempted) {
    12841291                if ($debug == 1) {
    1285                     print STDERR "confirm_stacks: Target $target on $date is not done stacking. $Nstacks $Nattempted\n"
     1292                    print STDERR "confirm_stacks: Target $target on $date is not done stacking. $Nstacks $Nattempted\n";
    12861293                }
    12871294                if ($metadata_out{nsState} eq 'CONFIRM_STACKING') {
    12881295                    $metadata_out{nsState} = 'STACKING';
    12891296                }
    1290                    
     1297                next;
     1298            }
     1299            if ($Nstacks == 0) {
     1300                if ($debug == 1) {
     1301                    print STDERR "confirm_stacks: Target $target on $date has no stacks. Skipping.\n";
     1302                }
    12911303                next;
    12921304            }
     
    15311543        my $N = $metadata_out{N_MACROS};
    15321544        $metadata_out{"ns${N}Macro"} = $macro_formats{$proc_mode};
    1533 #       print STDERR "WORKING ON A MACRO: ns${N}Macro $proc_mode $macro_formats{$proc_mode}\n";
     1545        if ($debug == 1) {
     1546            print STDERR "WORKING ON A MACRO: ns${N}Macro $proc_mode $macro_formats{$proc_mode}\n";
     1547        }
    15341548        if (defined($date)&&(defined($target))) {
    15351549
     
    15521566            $metadata_out{"ns${N}Macro"} =~ s/\@DATE\@/$date/;
    15531567        }
     1568        if ($debug == 1) {
     1569            print STDERR "DONE WITH A MACRO: ns${N}Macro $proc_mode $macro_formats{$proc_mode}\n";
     1570        }
    15541571        $metadata_out{N_MACROS} ++;
    15551572    }
Note: See TracChangeset for help on using the changeset viewer.