Check-in [cc5a68a6de]
Overview
Comment:Fixed cleanup issue which was causing excessive lookups
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cc5a68a6de7966b5867eb39d03bb2fbd8be695c5
User & Date: rkeene on 2014-11-05 21:41:57
Other Links: manifest | tags
Context
2014-11-06
02:49
Updated to indicate only that packaged files are writable check-in: 97e72202db user: rkeene tags: trunk
00:37
Merged in updates from trunk check-in: ee9eb7ed98 user: rkeene tags: internal_sha1
2014-11-05
21:41
Fixed cleanup issue which was causing excessive lookups check-in: cc5a68a6de user: rkeene tags: trunk
21:41
Added "package" command back, needed for older versions of "http" package check-in: b1167b6699 user: rkeene tags: trunk
Changes

Modified appfsd.tcl from [e521e020ce] to [86cb2b92c8].

   151    151   	}
   152    152   
   153    153   	proc download {hostname hash {method sha1}} {
   154    154   		set url "http://$hostname/appfs/$method/$hash"
   155    155   		set file [_cachefile $url $hash]
   156    156   
   157    157   		if {![file exists $file]} {
   158         -			return -code error "Unable to fetch"
          158  +			return -code error "Unable to fetch (file does not exist: $file)"
   159    159   		}
   160    160   
   161    161   		return $file
   162    162   	}
   163    163   
   164    164   	proc getindex {hostname} {
   165    165   		set now [clock seconds]
................................................................................
   185    185   
   186    186   		catch {
   187    187   			set token [::http::geturl $url]
   188    188   			if {[::http::ncode $token] == "200"} {
   189    189   				set indexhash_data [::http::data $token]
   190    190   			}
   191    191   			::http::reset $token
   192         -			$token cleanup
          192  +			::http::cleanup $token
   193    193   		}
   194    194   
   195    195   		if {![info exists indexhash_data]} {
   196    196   			# Cache this result for 60 seconds
   197    197   			_db eval {INSERT OR REPLACE INTO sites (hostname, lastUpdate, ttl) VALUES ($hostname, $now, $::appfs::nttl);}
   198    198   
   199    199   			return -code error "Unable to fetch $url"