[Mailman-Developers] sleep() after sending a chunk?

Fil fil at rezo.net
Tue Mar 30 07:36:53 EST 2004


> I'd really love to add somme sleep() function just after the deliveryfunc()
> call, something that would set Mailman to sleep about 1/10th of a second per
> recipient. I don't know any python, but I guess it would be something like
> 
>         while chunks:
>             chunk = chunks.pop()
>             msgdata['recips'] = chunk
>             try:
>                 deliveryfunc(mlist, msg, msgdata, envsender, refused, conn)
>                 sleep(sizeof(chunk)/10)
> 
> Can someone help with the code? I'll test the concept :)

I did add 
+                 sleep(len(chunk)/10)

and it seems to work. I'll test it big time tonight when I send a new batch
of 150 K emails, and keep you posted. But I'm not happy with the present
algorithm, because I'd like other lists not to be hampered by the big list,
so I'd rather have all lists send a chunk and go back to sleep, letting a
chacne to any other list to send one of its chunks. I don't think it'll be
too much of a rewrite to change that. Any ideas welcome.

-- Fil




More information about the Mailman-Developers mailing list