Changeset 36221
- Timestamp:
- Oct 16, 2013, 3:49:07 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
ippScripts/scripts/rawcheck.pl (modified) (5 diffs)
-
ippTasks/rawcheck.pro (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/rawcheck.pl
r36203 r36221 28 28 GetOptions( 29 29 'server|s=s' => \$server, 30 'dbname '=> \$dbname,30 'dbname=s' => \$dbname, 31 31 'exp_id|x=s' => \$exp_id, 32 32 ) || pod2usage( 2 ); … … 36 36 pod2usage( -msg => "Required options: --server", -exitval => 2 ) 37 37 unless $server; 38 pod2usage( -msg => "Required options: --dbname", -exitval => 2 ) 39 unless $dbname; 38 40 pod2usage( -msg => "missing key", exitval => 2 ) 39 41 unless defined $exp_id; … … 217 219 $quality[0] = 1; 218 220 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 219 234 $Ngood = 1; # We now hand off this single valid instance object to be handled by the Ngood=1 case. 220 235 } … … 265 280 @$uris = map {URI->new($_)->file if $_} @$uris; 266 281 267 print $uris . " " . ${ $uris }[0] . " \n";282 # print $uris . " " . ${ $uris }[0] . " \n"; 268 283 my $fh; 269 284 open($fh,${ $uris }[0]); … … 287 302 } 288 303 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"; 290 305 if ($quality[$i] != 1) { 291 306 my $cull_vol = $diskhosts[$i] . "." . $diskvols[$i]; -
trunk/ippTasks/rawcheck.pro
r36203 r36221 5 5 6 6 # load in the local configuration (NEB_USER, etc.) 7 module nebulous.site.pro7 # module nebulous.site.pro 8 8 9 9 $LOGSUBDIR = $LOGDIR/rawcheck … … 42 42 43 43 44 45 $EXP_ID_START = 0 46 $EXP_ID_RANGE = 500000 44 $DATEOBS_MIN = 1970-01-01T00:00:00 47 45 48 46 task rawcheck.load … … 50 48 51 49 # modify these after the tasks are tested 52 periods -poll 0.550 periods -poll 600 53 51 periods -exec 5 54 periods -timeout 150052 periods -timeout 20 55 53 npending 1 56 54 … … 66 64 end 67 65 68 $run = regtool -processedexp -state compressed 66 $run = regtool -processedexp -state compressed -dateobs_begin $DATEOBS_MIN 69 67 if ($DB:n == 0) 70 68 option DEFAULT … … 77 75 end 78 76 add_poll_args run 79 add_poll_labels run77 # add_poll_labels run 80 78 command $run 81 79 end … … 85 83 # convert 'stdout' to book format 86 84 ipptool2book stdout rawcheckPending -key exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 87 if ($VERBOSE > 2)85 if ($VERBOSE > 2) 88 86 book listbook rawcheckPending 89 87 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 90 93 91 94 # delete existing entries in the appropriate pantaskStates … … 112 115 periods -poll 0.5 113 116 periods -exec 5 114 periods -timeout 600 117 periods -timeout 1200 118 host anyhost 119 115 120 116 121 task.exec … … 136 141 137 142 # these operations do not require a database to be specified 138 $run = neb-insck--dbname $DBNAME --exp_id $EXP_ID143 $run = rawcheck.pl --dbname $DBNAME --exp_id $EXP_ID 139 144 140 145 # save the pageName for future reference below
Note:
See TracChangeset
for help on using the changeset viewer.
