[LON-CAPA-cvs] cvs: loncom /misc archive_old_files.pl

www lon-capa-cvs@mail.lon-capa.org
Sat, 13 May 2006 01:35:45 -0000


www		Fri May 12 21:35:45 2006 EDT

  Modified files:              
    /loncom/misc	archive_old_files.pl 
  Log:
  Just making sure ...
  
  
Index: loncom/misc/archive_old_files.pl
diff -u loncom/misc/archive_old_files.pl:1.1 loncom/misc/archive_old_files.pl:1.2
--- loncom/misc/archive_old_files.pl:1.1	Fri May 12 21:31:24 2006
+++ loncom/misc/archive_old_files.pl	Fri May 12 21:35:44 2006
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # zip all .db and .hist files that have not been accessed in 120 days
 #
-# $Id: archive_old_files.pl,v 1.1 2006/05/13 01:31:24 www Exp $
+# $Id: archive_old_files.pl,v 1.2 2006/05/13 01:35:44 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -34,6 +34,7 @@
 open(IN,$oldfile);
 while (my $dbfile=<IN>) {
     chomp($dbfile);
+    if (-e "$dbfile.lock") { next; }
     open(TOUCH,">>$dbfile.lock");
     close(TOUCH);
     system("gzip $dbfile");