use scrubbing

This commit is contained in:
Ward Wouts 2004-10-14 21:54:51 +00:00
parent 17cab1215c
commit bf26a4e7de

View file

@ -1,4 +1,4 @@
# $Dwarf: article.rb,v 1.90 2004/10/14 11:46:31 ward Exp $ # $Dwarf: article.rb,v 1.91 2004/10/14 21:47:06 ward Exp $
# $Source$ # $Source$
# #
@ -623,6 +623,8 @@ end
def scrub_cache(cachedir, server) def scrub_cache(cachedir, server)
# XXX this could and probably should be done in a separate thread... # XXX this could and probably should be done in a separate thread...
# XXX but it'll work for now # XXX but it'll work for now
# XXX also read articles aren't removed right now
# XXX this could be done, but I don't know if I want to pay the overhead
p "scrubbing cache" p "scrubbing cache"
p Time.now p Time.now
filename = "#{cachedir}/#{@group}.ripnewscache" filename = "#{cachedir}/#{@group}.ripnewscache"
@ -637,11 +639,11 @@ p Time.now
end end
end end
} }
#if ( File.move("#{filename}.#{server}.new", "#{filename}.#{server}") ) if ( File.move("#{filename}.#{server}.new", "#{filename}.#{server}") )
# print "Cache scrubbed for #{server}\n" print "Cache scrubbed for #{server}\n"
#else else
# print "Couldn't scrub #{server} cache\n" print "Couldn't scrub #{server} cache\n"
#end end
p Time.now p Time.now
end end