Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [PATCH] [issue7] configurable poll interval
@ 2010-01-04 15:23 Eric Sherman
  2010-01-05 21:30 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sherman @ 2010-01-04 15:23 UTC (permalink / raw)
  To: sup-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] [PATCH] [issue7] configurable poll interval
  2010-01-04 15:23 [sup-devel] [PATCH] [issue7] configurable poll interval Eric Sherman
@ 2010-01-05 21:30 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2010-01-05 21:30 UTC (permalink / raw)
  To: sup-devel

Applied to master. Thanks!
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-05 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04 15:23 [sup-devel] [PATCH] [issue7] configurable poll interval Eric Sherman
2010-01-05 21:30 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox