IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36221


Ignore:
Timestamp:
Oct 16, 2013, 3:49:07 PM (13 years ago)
Author:
watersc1
Message:

Functional version of the task and script that I'm running on a test pantasks now. The load step is unreasonably slow, but that may just be due to the host I"m running the pantasks_server on (ippc25).

The date based iteration seems to be working correctly.

Location:
trunk
Files:
2 edited

Legend:

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

    r36203 r36221  
    2828GetOptions(
    2929    'server|s=s'     => \$server,
    30     'dbname       => \$dbname,
     30    'dbname=s'       => \$dbname,
    3131    'exp_id|x=s'     => \$exp_id,
    3232) || pod2usage( 2 );
     
    3636pod2usage( -msg => "Required options: --server", -exitval => 2 )
    3737    unless $server;
     38pod2usage( -msg => "Required options: --dbname", -exitval => 2 )
     39    unless $dbname;
    3840pod2usage( -msg => "missing key", exitval => 2 )
    3941    unless defined $exp_id;
     
    217219        $quality[0] = 1;
    218220        print "cp $good_file $files[0]\n";
     221        system("cp $good_file $files[0]");
     222# Begin my best validation thought
     223        {
     224            my $fh;
     225            open($fh,$files[0]);
     226            my $tmpmd5 = Digest::MD5->new->addfile($fh)->hexdigest;
     227            close($fh);
     228            if ($tmpmd5 ne $md5sum) {
     229                die "Post-replication md5sum does not match! $tmpmd5 != $md5sum";
     230            }
     231        }
     232# End my best validation thought.
     233
    219234        $Ngood = 1;  # We now hand off this single valid instance object to be handled by the Ngood=1 case.
    220235    }
     
    265280                @$uris = map {URI->new($_)->file if $_} @$uris;
    266281
    267                 print $uris . " " . ${ $uris }[0] . " \n";
     282#               print $uris . " " . ${ $uris }[0] . " \n";
    268283                my $fh;
    269284                open($fh,${ $uris }[0]);
     
    287302        }
    288303        for (my $i = 0; $i <= $#files; $i++) {
    289             print "$existance[$i] $quality[$i] $md5sums[$i] $md5sum $diskhosts[$i] $diskvols[$i]\n";
     304#           print "$existance[$i] $quality[$i] $md5sums[$i] $md5sum $diskhosts[$i] $diskvols[$i]\n";
    290305            if ($quality[$i] != 1) {
    291306                my $cull_vol = $diskhosts[$i] . "." . $diskvols[$i];
  • trunk/ippTasks/rawcheck.pro

    r36203 r36221  
    55
    66# load in the local configuration (NEB_USER, etc.)
    7 module nebulous.site.pro
     7# module nebulous.site.pro
    88
    99$LOGSUBDIR = $LOGDIR/rawcheck
     
    4242
    4343
    44 
    45 $EXP_ID_START = 0
    46 $EXP_ID_RANGE = 500000
     44$DATEOBS_MIN  = 1970-01-01T00:00:00
    4745
    4846task           rawcheck.load
     
    5048
    5149  # modify these after the tasks are tested
    52   periods      -poll 0.5
     50  periods      -poll 600
    5351  periods      -exec 5
    54   periods      -timeout 1500
     52  periods      -timeout 20
    5553  npending     1
    5654
     
    6664     end     
    6765     
    68      $run = regtool -processedexp -state compressed
     66     $run = regtool -processedexp -state compressed -dateobs_begin $DATEOBS_MIN
    6967     if ($DB:n == 0)
    7068      option DEFAULT
     
    7775    end
    7876    add_poll_args run
    79     add_poll_labels run
     77#    add_poll_labels run
    8078    command $run
    8179  end
     
    8583    # convert 'stdout' to book format
    8684    ipptool2book stdout rawcheckPending -key exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    87         if ($VERBOSE > 2)
     85    if ($VERBOSE > 2)
    8886      book listbook rawcheckPending
    8987    end
     88
     89      book listbook rawcheckPending
     90    book npages rawcheckPending -var N
     91    book getpage rawcheckPending N -var pageName
     92    book getword rawcheckPending $pageName dateobs -var DATEOBS_MIN
    9093
    9194    # delete existing entries in the appropriate pantaskStates
     
    112115  periods      -poll 0.5
    113116  periods      -exec 5
    114   periods      -timeout 600
     117  periods      -timeout 1200
     118  host         anyhost
     119
    115120
    116121  task.exec
     
    136141
    137142    # these operations do not require a database to be specified
    138     $run = neb-insck --dbname $DBNAME --exp_id $EXP_ID
     143    $run = rawcheck.pl --dbname $DBNAME --exp_id $EXP_ID
    139144
    140145    # save the pageName for future reference below
Note: See TracChangeset for help on using the changeset viewer.