[LON-CAPA-cvs] cvs: loncom / lond
www
www@source.lon-capa.org
Mon, 30 Aug 2010 13:24:20 -0000
www Mon Aug 30 13:24:20 2010 EDT
Modified files:
/loncom lond
Log:
Remarks on timeouts in replication
Index: loncom/lond
diff -u loncom/lond:1.454 loncom/lond:1.455
--- loncom/lond:1.454 Sun Aug 22 19:28:26 2010
+++ loncom/lond Mon Aug 30 13:24:20 2010
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.454 2010/08/22 19:28:26 raeburn Exp $
+# $Id: lond,v 1.455 2010/08/30 13:24:20 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,7 +58,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.454 $'; #' stupid emacs
+my $VERSION='$Revision: 1.455 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -2155,7 +2155,10 @@
my $transname="$fname.in.transfer";
my $remoteurl=&Apache::lonnet::reply("sub:$fname","$clientname");
my $response;
- alarm(120);
+# FIXME: cannot replicate files that take more than two minutes to transfer?
+# alarm(120);
+# FIXME: this should use the LWP mechanism, not internal alarms.
+ alarm(1200);
{
my $ua=new LWP::UserAgent;
my $request=new HTTP::Request('GET',"$remoteurl");
@@ -2163,11 +2166,13 @@
}
alarm(0);
if ($response->is_error()) {
+# FIXME: we should probably clean up here instead of just whine
unlink($transname);
my $message=$response->status_line;
&logthis("LWP GET: $message for $fname ($remoteurl)");
} else {
if ($remoteurl!~/\.meta$/) {
+# FIXME: isn't there an internal LWP mechanism for this?
alarm(120);
{
my $ua=new LWP::UserAgent;