Re: [Zope-dev] Zope Tests: 12 OK, 7 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zope Tests Summarizer wrote: Summary of messages to the zope-tests list. Period Sat May 22 12:00:00 2010 UTC to Sun May 23 12:00:00 2010 UTC. There were 19 messages: 6 from Zope Tests, 12 from ccomb at free.fr, 1 from ct at gocept.com. Test failures - Subject: FAILED: Repository policy check found errors in 583 projects From: ct at gocept.com Date: Sat May 22 21:17:43 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014567.html Subject: FAILED : ZTK 1.0dev / Python2.5.2 Linux 32bit From: ccomb at free.fr Date: Sat May 22 23:00:25 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014578.html This is a build failure, due conflict markers in the ztk.cfg file. Subject: FAILED : ZTK 1.0dev / Python2.6.4 Linux 32bit From: ccomb at free.fr Date: Sat May 22 23:00:25 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014579.html Likewise. Subject: FAILED : ZTK 1.0dev / Python2.4.6 Linux 32bit From: ccomb at free.fr Date: Sat May 22 23:00:26 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014580.html Likewise. Subject: FAILED : ZTK 1.0 / Python2.4.6 Linux 32bit From: ccomb at free.fr Date: Sun May 23 01:54:02 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014583.html The 'test-ztk' failures here look like they need new releases of the following packages with the Python 2.4 doctest-compatibility fixes: - - zope.browserpage (maybe just this one) - - zope.viewlet - - zope.contentprovider The 'test-zopeapp' failure here and in the next two should go away once I release the updated version of zope.app.wsgi tonight. Subject: FAILED : ZTK 1.0 / Python2.5.2 Linux 32bit From: ccomb at free.fr Date: Sun May 23 01:54:57 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014584.html Subject: FAILED : ZTK 1.0 / Python2.6.4 Linux 32bit From: ccomb at free.fr Date: Sun May 23 01:55:28 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014585.html Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkv5u4AACgkQ+gerLs4ltQ5/4ACgqLwzijxcybB20oV5eZZsXml6 GysAn13nQ/JxZJ0RzuNx93N89RvkzX67 =cK1I -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope Tests: 12 OK, 7 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tres Seaver wrote: The 'test-zopeapp' failure here and in the next two should go away once I release the updated version of zope.app.wsgi tonight. zope.app.wsgi 3.9.2 is now released: http://pypi.python.org/pypi/zope.app.wsgi/3.9.2 Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkv5vz4ACgkQ+gerLs4ltQ4zAQCfRK5nL+gaE3jQg0iu4thWv9Co TjEAni5a0pkKVawjC7/w/WjGEKbFQ3aX =c8SD -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope Tests: 12 OK, 7 Failed
Le 24/05/2010 01:34, Tres Seaver a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zope Tests Summarizer wrote: Summary of messages to the zope-tests list. Period Sat May 22 12:00:00 2010 UTC to Sun May 23 12:00:00 2010 UTC. There were 19 messages: 6 from Zope Tests, 12 from ccomb at free.fr, 1 from ct at gocept.com. Test failures - Subject: FAILED: Repository policy check found errors in 583 projects From: ct at gocept.com Date: Sat May 22 21:17:43 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014567.html Subject: FAILED : ZTK 1.0dev / Python2.5.2 Linux 32bit From: ccomb at free.fr Date: Sat May 22 23:00:25 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014578.html This is a build failure, due conflict markers in the ztk.cfg file. Thanks for watching, I've moved the svn revert one step higher, above the bootstrap. Subject: FAILED : ZTK 1.0dev / Python2.6.4 Linux 32bit From: ccomb at free.fr Date: Sat May 22 23:00:25 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014579.html Likewise. Subject: FAILED : ZTK 1.0dev / Python2.4.6 Linux 32bit From: ccomb at free.fr Date: Sat May 22 23:00:26 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014580.html Likewise. Subject: FAILED : ZTK 1.0 / Python2.4.6 Linux 32bit From: ccomb at free.fr Date: Sun May 23 01:54:02 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014583.html The 'test-ztk' failures here look like they need new releases of the following packages with the Python 2.4 doctest-compatibility fixes: - - zope.browserpage (maybe just this one) - - zope.viewlet - - zope.contentprovider The 'test-zopeapp' failure here and in the next two should go away once I release the updated version of zope.app.wsgi tonight. Subject: FAILED : ZTK 1.0 / Python2.5.2 Linux 32bit From: ccomb at free.fr Date: Sun May 23 01:54:57 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014584.html Subject: FAILED : ZTK 1.0 / Python2.6.4 Linux 32bit From: ccomb at free.fr Date: Sun May 23 01:55:28 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-May/014585.html Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkv5u4AACgkQ+gerLs4ltQ5/4ACgqLwzijxcybB20oV5eZZsXml6 GysAn13nQ/JxZJ0RzuNx93N89RvkzX67 =cK1I -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] long running methods
On Thu, 20 May 2010 18:00:43 -0600, Shane Hathaway sh...@hathawaymix.org 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 method idx = 0 while idx len(work_items): conflicts = 0 try: my_batch = work_items[idx, idx+BATCH_SIZE] for work_item in my_batch: do_some_work(work_item) transaction.commit() except ConflicError: conflicts += 1 if conflicts MAX_CONFLICTS: raise else: idx += BATCH_SIZE does this sound like a reasonable approach? More than that, it looks nearly finished. ;-) The transaction machinery does all the heavy lifting, so you don't need to do much. Issues to fix: - Your code resets the conflicts counter in every iteration. You obviously didn't intend that. hmm, why not? every batch should be retried up to MAX_CONFLICTS times? - You should start each loop with transaction.begin() to avoid any side effects of transactions started before the long running method was called. cool. - Writing thorough tests for this kind of code is very important. If you don't, it might be a while before you discover that ConflictError was misspelled. actually python wouldn't compile that code above as ConflicError must resolve to a class at compile time but i get your point, agreed :) Shane thanks for your answers and have a nice day everbody. jürgen -- XLhost.de - eXperts in Linux hosting ® XLhost.de GmbH Jürgen Herrmann, Geschäftsführer Boelckestrasse 21, 93051 Regensburg, Germany Geschäftsführer: Volker Geith, Jürgen Herrmann Registriert unter: HRB9918 Umsatzsteuer-Identifikationsnummer: DE245931218 Fon: +49 (0)800 XLHOSTDE [0800 95467833] Fax: +49 (0)800 95467830 WEB: http://www.XLhost.de IRC: #xlh...@irc.quakenet.org ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )