From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.13.12 with SMTP id z12cs1217400ebz; Mon, 4 Jan 2010 10:03:30 -0800 (PST) Received: by 10.224.117.8 with SMTP id o8mr11389247qaq.227.1262628209337; Mon, 04 Jan 2010 10:03:29 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 3si27194177qyk.102.2010.01.04.10.03.28; Mon, 04 Jan 2010 10:03:29 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id B3BDD1779938; Mon, 4 Jan 2010 13:03:20 -0500 (EST) Received: from mail-qy0-f192.google.com (mail-qy0-f192.google.com [209.85.221.192]) by rubyforge.org (Postfix) with ESMTP id C063C1779A38 for ; Mon, 4 Jan 2010 10:23:58 -0500 (EST) Received: by qyk30 with SMTP id 30so7005703qyk.33 for ; Mon, 04 Jan 2010 07:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:subject:from:to :date:message-id:user-agent:content-transfer-encoding; bh=iEzXW5QxLeLwHu+qo9iiETRxJjNGqHfcfsK5G6PeE6A=; b=X/cVbaD+V3Yp22clS3XLbQ9NN8HjUy5yRQhCoAg1LbaOpqigtBYjN2bVnF+VPw6eD5 R19Cmww11QyyQPm3vDtsnSDrGOhn1rAPuHFtRA93cr9Zdki/D5dYFg5On6HK6+dAfZOB ugLMUCDwDoz99YQWBKgmfL6WmNU1xUImeTaU8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:subject:from:to:date:message-id:user-agent :content-transfer-encoding; b=Zg+zgBmjTs11kQkpeB8notslabQ7x8onXkfCRhXi2yp3otGjDfJYfTVyUJgcRnixBg 6AyzHehxm8tWozilvcijCgkDNb1WOZYuU9dwzvHXKPSHpRGE+ilXHnfHyvNhE6+WLjw+ kpXikZk3e3AwOa01ioGJrIM5OgAzlup2yyrgo= Received: by 10.229.43.9 with SMTP id u9mr2437874qce.44.1262618637247; Mon, 04 Jan 2010 07:23:57 -0800 (PST) Received: from localhost (c-76-98-110-216.hsd1.nj.comcast.net [76.98.110.216]) by mx.google.com with ESMTPS id 21sm16458124qyk.0.2010.01.04.07.23.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Jan 2010 07:23:56 -0800 (PST) From: Eric Sherman To: sup-devel Date: Mon, 04 Jan 2010 10:23:55 -0500 Message-Id: <1262618580-sup-7433@changeling.local> User-Agent: Sup/git Subject: [sup-devel] [PATCH] [issue7] configurable poll interval X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org 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