From mboxrd@z Thu Jan 1 00:00:00 1970 From: Georgi Chorbadzhiyski Subject: Re: [PATCH] send-mail: Add option to sleep between sending each email. Date: Thu, 08 Sep 2011 16:58:36 +0300 Organization: Unix Solutions Ltd. (http://unixsol.org) Message-ID: <4E68CA0C.5080702@unixsol.org> References: <1315428191-9769-1-git-send-email-gf@unixsol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Ramkumar Ramachandra , git@vger.kernel.org To: Matthieu Moy X-From: git-owner@vger.kernel.org Thu Sep 08 15:58:59 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R1f87-00034j-6k for gcvg-git-2@lo.gmane.org; Thu, 08 Sep 2011 15:58:59 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932996Ab1IHN6j (ORCPT ); Thu, 8 Sep 2011 09:58:39 -0400 Received: from ns.unixsol.org ([193.110.159.2]:38323 "EHLO ns.unixsol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932879Ab1IHN6i (ORCPT ); Thu, 8 Sep 2011 09:58:38 -0400 Received: from [10.0.1.78] ([::ffff:10.0.1.78]) (AUTH: CRAM-MD5 gf, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by ns.unixsol.org with esmtp; Thu, 08 Sep 2011 16:58:37 +0300 id 00140B8F.4E68CA0D.00004439 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110712 Thunderbird/5.0 In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Around 09/08/2011 02:15 PM, Matthieu Moy scribbled: > [1] Actually, I think there's a problem with Georgi's patch. If I read > correctly, the sleep is inserted within the confirmation loop, which > means the user will have > > send this email? yes > sending email > sleeping 10 seconds > send this email? yes > sending email > sleeping 10 seconds > ... > > while it should be > > send this email? yes > ok, I'll send it later > send this email? yes > ok, I'll send it later > sending first email ... > sleeping 10 seconds > sending second email > done. > > (i.e. don't force the user to wait between confirmations, and don't wait > after the last email) In order for this to work, confirmation should be split from send_message() and from a quick look this not seem very easy. Might be easier to just disable the sleep if user was asked for confirmation. It'll be good to not sleep after last email, but main "foreach my $t (@files) {" loop should pass some hint to send_message(). -- Georgi Chorbadzhiyski http://georgi.unixsol.org/