[Zope] Non-blocking MailHost
Loren Stafford
lstaffor@dynalogic.com
Mon, 4 Sep 2000 10:29:26 -0700
One way to start an asynchronous job in Zope is with the Xron product.
Instead of sending the email, you create a Xron scheduled method to perform
that task. If you specify a trigger time of "now" (or any time in the past),
the scheduled method will execute (almost) immediately in a separate Zope
thread. Or you could specify a later time for all emails, thereby
effectively batching them. You can store as much context as you need in the
acquisition path or properties of the scheduled method. Anything written to
STDOUT by the scheduled method will be stored in the log file, so you can
easily log any problems with sendmail.
http://www.zope.org/Members/lstaffor/Xron
-- HTH
-- Loren
----- Original Message -----
From: "Richard Taylor" <r.taylor@eris.dera.gov.uk>
To: <zope@zope.org>
Sent: September 04, 2000 08:11 AM
Subject: Re: [Zope] Non-blocking MailHost
> I think what people have in mind (correct me if I am wrong) is
> something that will accept messages (for posting to the mailhost at
> some time in the future) and then immediately return. I guess it would
spawn
> another process/thread to do the posting asynchronously.
>
> The problem, as I see it is how to handle an error with the
> posting. The user who submitted the mail is now long gone so it must
> be left to an administrator to pick up the pieces.
>
> Perhaps the posting routine could accept a user (developer) provided
> exception handler that gets called if a posting fails.
>
> It maybe better to just hand this off to a completely separate program
> rather than try to handle it within a zope thread.
>
> Richard
>
> andres@corrada.com writes:
>
> > Chris,
> >
> > Out of curiosity, what exactly is a non-blocking MailHost?
> >
> > On Mon, Sep 04, 2000 at 09:31:15AM +0100, Chris Withers wrote:
> > >
> > > What we really want is a non-blocking MailHost.
> > >
> > > Anyone know how or want to write one?
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>