[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sup-devel] [PATCH] [issue7] 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.
---
lib/sup.rb | 3 ++-
lib/sup/poll.rb | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup.rb b/lib/sup.rb
index 840b3fc..b83bbe7 100644
--- 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
index 4f30505..f3e1224 100644
--- 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
--
1.6.5.7
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel