Diff for /doc/loncapafiles/update_queue_slots.piml between versions 1.1 and 1.2

version 1.1, 2006/06/05 23:18:45 version 1.2, 2006/06/16 19:38:10
Line 54  sub update_value { Line 54  sub update_value {
     return $value;      return $value;
 }  }
   
 my $updated;  my $updated=0;
   my %dirs;
   my $last;
   my $total;
 sub process_gradingqueue_file {  sub process_gradingqueue_file {
       my $which = (split('/',$_))[5];
       $dirs{$which} = 1;
       my $count2 = length("$last");
       my $count = length("$updated");
       my $backup = "\b"x(8+$count2+14+$count+6);
       if (scalar(keys(%dirs)) > $last) {
            $last = scalar(keys(%dirs));
            print($backup."Updated $last directories, $updated files");
       }
     return if ($_!~m/(gradingqueue|reviewqueue|slots|slot_reservations)\.db$/);      return if ($_!~m/(gradingqueue|reviewqueue|slots|slot_reservations)\.db$/);
     my $type='queue';      my $type='queue';
     if ($1 eq 'slots') {      if ($1 eq 'slots') {
Line 63  sub process_gradingqueue_file { Line 75  sub process_gradingqueue_file {
     } elsif ($1 eq 'slot_reservations') {      } elsif ($1 eq 'slot_reservations') {
  $type = 'reservation';   $type = 'reservation';
     }      }
       my $count2 = length("$last");
     my $count = length("$updated");      my $count = length("$updated");
       my $backup = "\b"x(8+$count2+14+$count+6);
     $updated++;      $updated++;
     print("\b"x(14+$count));      print($backup."Updated $last directories, $updated files");
     print("Updated $updated files");  
     my $prefix = $_;      my $prefix = $_;
     $prefix =~s/\.db$//;      $prefix =~s/\.db$//;
     my $db = &LONCAPA::_locking_hash_tie($prefix,'nohist_',&GDBM_WRCREAT());      my $db = &LONCAPA::_locking_hash_tie($prefix,'nohist_',&GDBM_WRCREAT());
Line 128  sub main { Line 141  sub main {
      no_chdir   => 1,       no_chdir   => 1,
      wanted     => \&process_gradingqueue_file,       wanted     => \&process_gradingqueue_file,
  },    }, 
          '/home/www/lonUsers/');           $perlvar->{'lonUsersDir'});
      print("\n");       print("\n");
 }  }
   

Removed from v.1.1  
changed lines
  Added in v.1.2


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