Diff for /loncom/metadata_database/searchcat.pl between versions 1.38 and 1.39

version 1.38, 2003/08/21 00:19:05 version 1.39, 2003/08/21 01:48:22
Line 309  foreach my $user (@homeusers) { Line 309  foreach my $user (@homeusers) {
         my $ref=&metadata($m);          my $ref=&metadata($m);
         my $m2='/res/'.&declutter($m);          my $m2='/res/'.&declutter($m);
         $m2=~s/\.meta$//;          $m2=~s/\.meta$//;
         &dynamicmeta($m2);  #        &dynamicmeta($m2);
  &count($m2);   &count($m2);
         $delete_sth->execute($m2);          $delete_sth->execute($m2);
         $insert_sth->execute($ref->{'title'},          $insert_sth->execute($ref->{'title'},
Line 340  foreach my $user (@homeusers) { Line 340  foreach my $user (@homeusers) {
     #      #
     # Check the size of nohist_new_resevaldata.db compared to       # Check the size of nohist_new_resevaldata.db compared to 
     # nohist_resevaldata.db      # nohist_resevaldata.db
     my @stat_result = stat($prodir.'/nohist_new_resevaldata.db');  #    my @stat_result = stat($prodir.'/nohist_new_resevaldata.db');
     my $new_size = $stat_result[7];  #    my $new_size = $stat_result[7];
     @stat_result = stat($prodir.'/nohist_resevaldata.db');  #    @stat_result = stat($prodir.'/nohist_resevaldata.db');
     my $old_size = $stat_result[7];  #    my $old_size = $stat_result[7];
     if ($old_size) {  #    if ($old_size) {
  if ($new_size/$old_size > 0.15 ) {  # if ($new_size/$old_size > 0.15 ) {
     system('mv '.$prodir.'/nohist_new_resevaldata.db '.  #    system('mv '.$prodir.'/nohist_new_resevaldata.db '.
    $prodir.'/nohist_resevaldata.db');  #   $prodir.'/nohist_resevaldata.db');
  } else {  # } else {
     print LOG "Size of '$user' old nohist_reseval: $old_size ".  #    print LOG "Size of '$user' old nohist_reseval: $old_size ".
  "Size of new: $new_size.  Not overwriting.\n";  # "Size of new: $new_size.  Not overwriting.\n";
     my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";  #    my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}";
     my $subj="LON: $perlvar{'lonHostID'} searchcat.pl $user reseval ".  #    my $subj="LON: $perlvar{'lonHostID'} searchcat.pl $user reseval ".
  "modification error.";  # "modification error.";
     system("echo ".  #    system("echo ".
  "'See /home/httpd/perl/logs/searchcat.txt for information.' ".  # "'See /home/httpd/perl/logs/searchcat.txt for information.' ".
    "| mailto $emailto -s '$subj' > /dev/null");  #   "| mailto $emailto -s '$subj' > /dev/null");
  }  # }
     }     #    }   
 }  }
 # --------------------------------------------------- Close database connection  # --------------------------------------------------- Close database connection
 $dbh->disconnect;  $dbh->disconnect;

Removed from v.1.38  
changed lines
  Added in v.1.39


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>