summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/feed2imap1
-rw-r--r--data/doc/feed2imap/examples/feed2imaprc4
-rw-r--r--lib/feed2imap/cache.rb1
-rw-r--r--lib/feed2imap/config.rb2
-rw-r--r--lib/feed2imap/feed2imap.rb1
5 files changed, 6 insertions, 3 deletions
diff --git a/bin/feed2imap b/bin/feed2imap
index b31c191..663d661 100755
--- a/bin/feed2imap
+++ b/bin/feed2imap
@@ -11,6 +11,7 @@ cacherebuild = false
configf = ENV['HOME'] + '/.feed2imaprc'
progname = File::basename($PROGRAM_NAME)
opts = OptionParser::new do |opts|
+ opts.program_name = progname
opts.banner = "Usage: #{progname} [options]"
opts.separator ""
opts.separator "Options:"
diff --git a/data/doc/feed2imap/examples/feed2imaprc b/data/doc/feed2imap/examples/feed2imaprc
index 0d8eaac..64a22e7 100644
--- a/data/doc/feed2imap/examples/feed2imaprc
+++ b/data/doc/feed2imap/examples/feed2imaprc
@@ -1,7 +1,7 @@
# Global options:
# max-failures: maximum number of failures allowed before they are reported in
-# normal mode (default 5). By default, failures are only visible in verbose
-# mode.
+# normal mode (default 10). By default, failures are only visible in verbose
+# mode. Most feeds tend to suffer from temporary failures.
# dumpdir: (for debugging purposes) directory where all fetched feeds will be
# dumped.
# debug-updated: (for debugging purposes) if true, display a lot of information
diff --git a/lib/feed2imap/cache.rb b/lib/feed2imap/cache.rb
index 00e6951..6dc0ddf 100644
--- a/lib/feed2imap/cache.rb
+++ b/lib/feed2imap/cache.rb
@@ -176,6 +176,7 @@ class CachedChannel
puts "-------Items already there (#{@items.length}) :----------"
@items.each { |i| puts "#{i.to_s}" }
puts "Items always considered as new: #{always_new.to_s}"
+ puts "Items compared ignoring the hash: #{ignore_hash.to_s}"
end
items.each do |i|
found = false
diff --git a/lib/feed2imap/config.rb b/lib/feed2imap/config.rb
index c6439d1..3aea4bb 100644
--- a/lib/feed2imap/config.rb
+++ b/lib/feed2imap/config.rb
@@ -36,7 +36,7 @@ class F2IConfig
@dumpdir = @conf['dumpdir'] || nil
@conf['feeds'] ||= []
@feeds = []
- @max_failures = (@conf['max-failures'] || 5).to_i
+ @max_failures = (@conf['max-failures'] || 10).to_i
@updateddebug = (@conf['debug-updated'] and @conf['debug-updated'] != 'false')
@imap_accounts = ImapAccounts::new
@conf['feeds'].each do |f|
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb
index 3cc27ca..a3666db 100644
--- a/lib/feed2imap/feed2imap.rb
+++ b/lib/feed2imap/feed2imap.rb
@@ -232,6 +232,7 @@ class Feed2Imap
@logger.info("Closing IMAP connections ...")
@config.imap_accounts.each_value do |ac|
begin
+ ac.logout
ac.disconnect
rescue
# servers tend to cause an exception to be raised here, hence the INFO level.