[Zope-Checkins] SVN:
Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ProgressHandler.py
added
Florent Guillaume
fg at nuxeo.com
Thu Jul 15 11:31:31 EDT 2004
Just a reminder that volatile variables can disappear quite easily when
memory pressure is high, especially at partial commits time, which
ZCatalog uses.
Florent
> Added: Zope/branches/ajung-zcatalog-progress/lib/python/Products/ZCatalog/ProgressHandler.py
> ===================================================================
> +class ProgressHandler:
> + """ A simple machinery to provide progres informations for long running
> + ZCatalog operations like reindexing.
> + """
> +
> + def pg_register(self, handler=None):
> + self._v_pg_handler = handler
> +
> +
> + def pg_init(self, max):
> + handler = getattr(self, '_v_pg_handler', None)
> + if not handler: return
> + handler.init(max)
> +
> + def pg_finish(self):
> + handler = getattr(self, '_v_pg_handler', None)
> + if not handler: return
> + handler.finish()
> +
> + def pg_report(self, current, *args, **kw):
> + handler = getattr(self, '_v_pg_handler', None)
> + if not handler: return
> + handler.report(current, *args, **kw)
>
> _______________________________________________
> Zope-Checkins maillist - Zope-Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/zope-checkins
>
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg at nuxeo.com
More information about the Zope-Checkins
mailing list