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$
#
@ -623,6 +623,8 @@ end
def scrub_cache(cachedir, server)
# XXX this could and probably should be done in a separate thread...
# 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 Time.now
filename = "#{cachedir}/#{@group}.ripnewscache"
@ -637,11 +639,11 @@ p Time.now
end
end
}
#if ( File.move("#{filename}.#{server}.new", "#{filename}.#{server}") )
# print "Cache scrubbed for #{server}\n"
#else
# print "Couldn't scrub #{server} cache\n"
#end
if ( File.move("#{filename}.#{server}.new", "#{filename}.#{server}") )
print "Cache scrubbed for #{server}\n"
else
print "Couldn't scrub #{server} cache\n"
end
p Time.now
end