[Zope-dev] Sessions, ConflictError and emails

morten at nidelven-it.no morten at nidelven-it.no
Mon Feb 18 16:23:55 EST 2008


Hi,

I have a site which is based on Zope and Plone, where users can
shop around (shopping cart is stored in SESSION objects) and
a separate part of the site (backend, Plone) where newsletters
and such can be sent out.

I have a problem however with duplicate emails being sent out
to the subscribers, and this is most likely due to conflict
errors being raised..

The event.log file says:

2008-02-18T21:05:23 INFO ZPublisher.Conflict ConflictError at
/VirtualHostBase/http/www.site:80/VirtualHostRoot/levanger/plone/site_newsletter/nyhetsbrev-130208/testSendToMe:
database conflict error (oid 0x92aa, class BTrees._OOBTree.OOBTree, serial
this txn started with 0x0373d8eef99cf5bb 2008-02-18 21:02:58.503076, serial
currently committed 0x0373d8f1624479aa 2008-02-18 21:05:23.031441) (58
conflicts (0 unresolved) since startup at Thu Jan 24 17:34:08 2008)

Now, those errors aren't a big deal in themselves, but it
is a problem when the system sends out duplicate mail messages
to lots of visitors.

I've seen some blurbs about deferring sending emails until
the transaction has been completed, and I just discovered
zope.sendmail which is said to defer sending emails until
the transaction has succeeded.

Is zope.sendmail a good choice?  Will it work with Zope
2.9.8?

Thanks,

Morten



More information about the Zope-Dev mailing list