[Zope] long running methods
Andreas Jung
lists at zopyx.com
Thu May 20 10:23:22 EDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Patrick Gerken wrote:
> On Thu, May 20, 2010 at 14:18, Jürgen Herrmann
> <Juergen.Herrmann at xlhost.de <mailto:Juergen.Herrmann at xlhost.de>> wrote:
>
>
> hi there!
>
> as our zope2 zodb grows we experience more and more conflicts
> with long running transactions. so i'm going to rewrite these
> methods to commit transactions in batches - here my attempt
> to tackle this problem. the idea is to get a list of objects
> to be modified in this transaction, break it down to batches
> and commit after each batch was processed. to avoid zope's
> retry-on-conflict machinery and still have a chance to retry
> per batch transaction commits, the iteration over one batch
> is guarded by a try:except ConflictError: and a retry logic.
>
>
> Zope already has its own retry mechanism, maybe you might want to
> call your long running method multiple times, each time working on the
> next batch.
>
There retry applies only for methods called through the web - but
not when you use bin/instance run or so.
Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkv1RdkACgkQCJIWIbr9KYzAPACgmuwVdknppy0Ilg0MzC6nzWJA
1UoAn2DW/IVPfIjqfC4x6pG0b1IMObVU
=gHpt
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 330 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20100520/160d040c/attachment.vcf
More information about the Zope
mailing list