[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Fri Oct 23 12:01:41 EDT 2015


raeburn		Fri Oct 23 16:01:41 2015 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Eliminate duplication of "Trying to get resource data for ... " messages
    in lonnet.log for a specific user where con_lost result is from cache
    (memcache), with 10 minute expiration.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1293 loncom/lonnet/perl/lonnet.pm:1.1294
--- loncom/lonnet/perl/lonnet.pm:1.1293	Sun Sep 20 18:31:43 2015
+++ loncom/lonnet/perl/lonnet.pm	Fri Oct 23 16:01:41 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1293 2015/09/20 18:31:43 raeburn Exp $
+# $Id: lonnet.pm,v 1.1294 2015/10/23 16:01:41 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10174,10 +10174,12 @@
     }
     #error 2 occurs when the .db doesn't exist
     if ($tmp!~/error: 2 /) {
-	&logthis("<font color=\"blue\">WARNING:".
-		 " Trying to get resource data for ".
-		 $uname." at ".$udom.": ".
-		 $tmp."</font>");
+        if ((!defined($cached)) || ($tmp ne 'con_lost')) {
+	    &logthis("<font color=\"blue\">WARNING:".
+		     " Trying to get resource data for ".
+		     $uname." at ".$udom.": ".
+		     $tmp."</font>");
+        }
     } elsif ($tmp=~/error: 2 /) {
 	#&EXT_cache_set($udom,$uname);
 	&do_cache_new('userres',$hashid,undef,600);




More information about the LON-CAPA-cvs mailing list