Thanks for your reply,

Supposedly the bucket_size: should be 1 and not 8 according to this post
http://groups.google.co.uk/group/google-appengine/browse_thread/thread/3d64511a517cffc1/64fe290597597511?lnk=gst&q=mail+taskqueue#64fe290597597511

But I tried it anyway and it had no effect, it's still sending out about 10
emails per _second_ in my test, instead of the 8 per minute that I need.

I don't think the second alternative would work either since there is a time
limit of 30 seconds per request and it would probably trigger a deadline
exceeded exception.
http://groups.google.co.uk/group/google-appengine/browse_thread/thread/28e7ecde894c59a9/896fbdcf0d836296?lnk=gst&q=mail+taskqueue#896fbdcf0d836296

Surely there must be some way to get App-Engine to send out emails at a
certain rate without hitting the OverQuotaError? Anyone who successfully
implemented it?



On Thu, Jan 14, 2010 at 7:31 PM, Eli Jones <[email protected]> wrote:

> Why don't you just configure it like so:
>
> -name:mail-queue
>   rate:8/m
>   bucket_size:8
>
> Now.. this is presuming that when you add a task to this mail-queue.. the
> task is configured to send 1 e-mail to 1 recipient.
>
> Though, you could create a recursive task queue that would work something
> like this:
>
> Let,
>
>  N = number of recipients
>  M = batch number
>
> When ready to start emailing.. fire off task: MailTask(1)
>
> Where,
>
> MailTask(M) =
>   1. Send emails to recipients M, M+1, M+2, ..., M+7
>   2. If M+8 > N, Goto Step 4.  Else Goto Step 3.
>   3. Schedule MailTask(M+8) to run in 61 Seconds
>   4. Success
>
> Or you could have it email one recipient at a time and reschedule itself to
> run M+1 in 8 seconds.  That way.. if there is an error during the Task and
> it automatically restarts.. you won't get a duplicated email sent out to
> more than one person.
>
> Though, you'd also need to give each task a unique name like
> str(M)+"_NewsletterVersion" to ensure that you didn't double up any tasks on
> the off chance that there was a timeout during the Task Add stage (I've had
> this happen.. Task Add timed out.. but the Task had been added.. so the
> previous task started over.. and added the "next" task again.  Thus, the
> recursive task had forked into two task streams.)
>
> On Thu, Jan 14, 2010 at 9:49 AM, Emanuel Berglund <
> [email protected]> wrote:
>
>> I posted a while back about getting an "OverQuotaError" when sending
>> out 74 emails in quick succession.
>> It turned out I was breaking the 8 emails per second cap, to solve
>> this I was told to use a task queue.
>>
>> I've now set up a task queue and have created a specific mail queue in
>> my queue.yml for sending emails out.
>> I use the following configuration with the aim to send out 8 emails
>> per minute, and I'm trying to not use the bucket by setting it to 0.
>>
>> - name: mail-queue
>>  rate: 8/m
>>  bucket_size: 0
>>
>>
>> But, when I run a test and send out emails to 28 people, it seems it's
>> still sending out emails at a very high rate. It sends them out at
>> about 10 emails per second based on the information on the ETA of the
>> tasks in the queue in the live App Engine panel.
>>
>> This isn't paced out to 8 emails per minute and I'm afraid I might go
>> over my qota and get the OverQuotaError again. Since I am sending out
>> a newsletter I really can't afford to have to restart it again and
>> risk sending the same letter twice to a number of people.
>>
>> My account doesn't have billing activated but has had the free quota
>> bumped up.
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<google-appengine%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
-------------------------------------------------------
Visit my personal websites:
http://www.musicpilgrimages.com
http://www.countryplug.com
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Reply via email to