summaryrefslogtreecommitdiff
path: root/bin/feed2imap-cleaner
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-15 21:25:51 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-15 21:25:51 +0200
commit3c882ab5a145b0166611714131aa130386b287ab (patch)
treef92e76708df8ff785acf924a46272fa84f84cb93 /bin/feed2imap-cleaner
parent78a3ec0d6ee2beb694c4169e673ef565aaa2fe5b (diff)
downloadfeed2imap-3c882ab5a145b0166611714131aa130386b287ab.tar.gz
feed2imap-3c882ab5a145b0166611714131aa130386b287ab.tar.bz2
feed2imap-3c882ab5a145b0166611714131aa130386b287ab.zip
More info for cleaning channels
Diffstat (limited to 'bin/feed2imap-cleaner')
-rwxr-xr-xbin/feed2imap-cleaner7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/feed2imap-cleaner b/bin/feed2imap-cleaner
index b616585..af7b99c 100755
--- a/bin/feed2imap-cleaner
+++ b/bin/feed2imap-cleaner
@@ -45,11 +45,13 @@ if docache
end
before = cache.nbchannels
+ keys_before = cache.channels
puts "Cleaning up"
cache.cleanup(config.feeds)
after = cache.nbchannels
+ keys_after = cache.channels
if not dryrun
puts "Saving cache ..."
@@ -61,11 +63,14 @@ if docache
begin
File::rename("#{config.cache}.new", config.cache)
rescue
- puts"Exception caught while renaming #{@config.cache}.new to #{@config.cache}: #{$!}"
+ puts "Exception caught while renaming #{@config.cache}.new to #{@config.cache}: #{$!}"
end
end
puts "#Channels before: #{before}, after: #{after}"
+ (keys_before - keys_after).each do |c|
+ puts "Removed channel #{c}"
+ end
else
config.imap_accounts.each_value do |ac|
ac.connect