--- loncom/cgi/clusterstatus.pl 2003/07/31 19:18:16 1.11 +++ loncom/cgi/clusterstatus.pl 2003/08/01 14:47:44 1.13 @@ -3,7 +3,7 @@ $|=1; # The LearningOnline Network with CAPA # Cluster Status # -# $Id: clusterstatus.pl,v 1.11 2003/07/31 19:18:16 www Exp $ +# $Id: clusterstatus.pl,v 1.13 2003/08/01 14:47:44 www Exp $ use lib '/home/httpd/lib/perl/'; use LONCAPA::Configuration; @@ -47,6 +47,7 @@ sub hidden { sub request { my ($local,$url,$cachetime)=@_; + $cachetime*=(0.5+rand); my $key=&key($local,$url); my $reply=''; if ($FORM{$key.'_time'}) { @@ -61,7 +62,7 @@ sub request { $reply='local_unknown'; } else { - my $ua=new LWP::UserAgent(timeout => 20); + my $ua=new LWP::UserAgent(timeout => 15); my $request=new HTTP::Request('GET', "http://".$hostname{$local}.$url); @@ -94,7 +95,7 @@ sub connected { # Slowly phase this in: if not cached, only do 10 percent of the cases # unless ($FORM{&key($local,$url)}) { - unless (rand>0.9) { return 'not_yet'; } + unless (rand>0.95) { return 'not_yet'; } } # # Actually do the query @@ -482,7 +483,7 @@ foreach $local (sort keys %hostname) { print '