Re: [Zope] long running methods

2010-05-23 Thread Jürgen Herrmann
On Thu, 20 May 2010 18:00:43 -0600, Shane Hathaway wrote: > On 05/20/2010 06:18 AM, Jürgen Herrmann wrote: >> def myLongRunningMethod(self): >> >>BATCH_SIZE = 10 >>MAX_CONFLICTS = 3 >> >>work_items = [some, work, to , do, ...] >># list of persistent objects to be modified in this

Re: [Zope] long running methods

2010-05-20 Thread Shane Hathaway
On 05/20/2010 06:18 AM, Jürgen Herrmann wrote: > def myLongRunningMethod(self): > >BATCH_SIZE = 10 >MAX_CONFLICTS = 3 > >work_items = [some, work, to , do, ...] ># list of persistent objects to be modified in this method > >idx = 0 >while idx< len(work_items): > confli

Re: [Zope] long running methods

2010-05-20 Thread robert rottermann
Am 20.05.2010 21:01, schrieb Maik Derstappen, Derstappen IT: > Am 20.05.2010 20:04, schrieb robert rottermann: >> Am 20.05.2010 19:34, schrieb Maik Derstappen, Derstappen IT: >> >>> Am 20.05.2010 16:05, schrieb Jürgen Herrmann: >>> On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken >

Re: [Zope] long running methods

2010-05-20 Thread Maik Derstappen, Derstappen IT
Am 20.05.2010 20:04, schrieb robert rottermann: > Am 20.05.2010 19:34, schrieb Maik Derstappen, Derstappen IT: > >> Am 20.05.2010 16:05, schrieb Jürgen Herrmann: >> >>> On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken >>>wrote: >>> >>> On Thu, May 20, 2010 at 14:18, Jür

Re: [Zope] long running methods

2010-05-20 Thread robert rottermann
Am 20.05.2010 19:34, schrieb Maik Derstappen, Derstappen IT: > Am 20.05.2010 16:05, schrieb Jürgen Herrmann: >> On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken >> wrote: >> >>> On Thu, May 20, 2010 at 14:18, Jürgen Herrmann >>> wrote: >>> >>> hi there! as our zope2 zodb grows we

Re: [Zope] long running methods

2010-05-20 Thread Maik Derstappen, Derstappen IT
Am 20.05.2010 16:05, schrieb Jürgen Herrmann: > On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken > wrote: > >> On Thu, May 20, 2010 at 14:18, Jürgen Herrmann >> wrote: >> >> >>> hi there! >>> >>> as our zope2 zodb grows we experience more and more conflicts >>> with long running transactions. s

Re: [Zope] long running methods

2010-05-20 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick Gerken wrote: > On Thu, May 20, 2010 at 14:18, Jürgen Herrmann > mailto:juergen.herrm...@xlhost.de>> wrote: > > > hi there! > > as our zope2 zodb grows we experience more and more conflicts > with long running transactions. so i'

Re: [Zope] long running methods

2010-05-20 Thread Jürgen Herrmann
On Thu, 20 May 2010 15:59:58 +0200, Patrick Gerken wrote: > On Thu, May 20, 2010 at 14:18, Jürgen Herrmann > 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 transact

Re: [Zope] long running methods

2010-05-20 Thread Patrick Gerken
On Thu, May 20, 2010 at 14:18, Jürgen Herrmann 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

[Zope] long running methods

2010-05-20 Thread Jürgen Herrmann
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