lib/wmap/site_tracker.rb
# Setter to remove entry from the site store one at a time
Setter to remove entry from the site store one at a time
Setter to remove entry from the site store one at a time
def delete(site)
		puts "Remove entry from the site store: #{site} " if @verbose
		deact=Wmap::SiteTracker::DeactivatedSite.instance
		deact.sites_file=@data_dir + 'deactivated_sites'
		File.write(deact.sites_file, "") unless File.exist?(deact.sites_file)
		site=site.strip.downcase
		site=url_2_site(site)
		if @known_sites.key?(site)
			site_info=@known_sites[site]
			deact.add(site,site_info)
			deact.save!
			deact=nil
			del=@known_sites.delete(site)
			puts "Entry cleared: #{site}"
			return del
		else
			puts "Entry not fund. Skip #{site}"
			deact=nil
			return nil
		end
	rescue => ee
		puts "Exception on method #{__method__}: #{ee}" if @verbose
		deact=nil
	end
def delete ( site ) puts "Remove entry from the site store: #{site} " if @verbose deact = Wmap :: SiteTracker :: DeactivatedSite . instance deact . sites_file = @data_dir + 'deactivated_sites' File . write ( deact . sites_file , "" ) unless File . exist? ( deact . sites_file ) site = site . strip . downcase site = url_2_site ( site ) if @known_sites . key? ( site ) site_info = @known_sites [ site ] deact . add ( site , site_info ) deact . save! deact = nil del = @known_sites . delete ( site ) puts "Entry cleared: #{site}" return del else puts "Entry not fund. Skip #{site}" deact = nil return nil end rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose deact = nil end
Setter to remove entry from the site store one at a time
Setter to remove entry from the site store one at a time
# Additional logic to deactivate the site properly, by moving it to the DeactivatedSite list, 02/07/2014
site
<not_specific>