sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 7661ab60afba187a6c7105a7f8382344c14111c3
parent 1ab871042718291a5818bd1b557f24e66db2daac
Author: Eric Sherman <hyperbolist@gmail.com>
Date:   Mon,  4 Jan 2010 10:23:55 -0500

configurable poll interval

This patch does not add configurable per-source poll intervals, but it
does add a single :poll_interval which still defaults to 300 seconds if
not defined in config.yaml.

Diffstat:
M lib/sup.rb | 3 ++-
M lib/sup/poll.rb | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -229,7 +229,8 @@ else
     :confirm_top_posting => true,
     :discard_snippets_from_encrypted_messages => false,
     :default_attachment_save_dir => "",
-    :sent_source => "sup://sent"
+    :sent_source => "sup://sent",
+    :poll_interval => 300
   }
   begin
     FileUtils.mkdir_p Redwood::BASE_DIR
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
@@ -28,7 +28,7 @@ num_inbox_total_unread: the total number of unread messages in the inbox
                         only those messages appearing in the inbox
 EOS
 
-  DELAY = 300
+  DELAY = $config[:poll_interval] || 300
 
   def initialize
     @mutex = Mutex.new