Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Eric Sherman <hyperbolist@gmail.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] [issue7] configurable poll interval
Date: Mon, 04 Jan 2010 10:23:55 -0500	[thread overview]
Message-ID: <1262618580-sup-7433@changeling.local> (raw)

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


             reply	other threads:[~2010-01-04 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 15:23 Eric Sherman [this message]
2010-01-05 21:30 ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262618580-sup-7433@changeling.local \
    --to=hyperbolist@gmail.com \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox