[LON-CAPA-cvs] cvs: loncom / lond
raeburn
raeburn at source.lon-capa.org
Fri Aug 25 23:57:02 EDT 2017
raeburn Sat Aug 26 03:57:02 2017 EDT
Modified files:
/loncom lond
Log:
- If replication fails when retrieving an resource which has been updated,
unsubscribe and remove the existing file, as it's no longer current.
Index: loncom/lond
diff -u loncom/lond:1.540 loncom/lond:1.541
--- loncom/lond:1.540 Tue Jun 6 20:03:24 2017
+++ loncom/lond Sat Aug 26 03:57:01 2017
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.540 2017/06/06 20:03:24 raeburn Exp $
+# $Id: lond,v 1.541 2017/08/26 03:57:01 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -65,7 +65,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.540 $'; #' stupid emacs
+my $VERSION='$Revision: 1.541 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -2607,8 +2607,12 @@
my $request=new HTTP::Request('GET',"$remoteurl");
$response=&LONCAPA::LWPReq::makerequest($clientname,$request,$transname,\%perlvar,1200,0,1);
if ($response->is_error()) {
-# FIXME: we should probably clean up here instead of just whine
- unlink($transname);
+ my $reply=&Apache::lonnet::reply("unsub:$fname","$clientname");
+ &devalidate_meta_cache($fname);
+ if (-e $transname) {
+ unlink($transname);
+ }
+ unlink($fname);
my $message=$response->status_line;
&logthis("LWP GET: $message for $fname ($remoteurl)");
} else {
More information about the LON-CAPA-cvs
mailing list