[Zope-dev] post publishing hook
Jim Fulton
jim at zope.com
Mon Apr 4 10:39:22 EDT 2005
Florent Guillaume wrote:
> I really could use a post publishing hook.
> Standard use case: delay indexing at the end of the request to only do
> it once per object even if the object has been modified 4 times.
>
> Today there's the REQUEST._hold() hack with an instance having a
> __del__, but this gets executed outside the main transaction, and
> REQUEST is already dying.
>
> I'd like a post-publishing hook that's called in the initial REQUEST and
> transaction.
I haven't been folowing this thread, so I asked Gary what it was about. :)
Based on that, I'd like to suggest:
There are two possibilities:
1. A post publishing hook. I think this would be appropriate
in the case where you really want to augment the publishing
process. For example, I hpe someday to use something like
this to provide another way (other than metal) to provide
standard look and feel.
Unfortunately, I think there are a lot of open issues, at least
in my mind, about how something like this should work.
2. A pre-commit hook. I think your use case fits this much better.
We've thought about this for some time. In fact, I've talked about
it enough that I thought we already had this, but we don't.
I think this is the way to go for your use case.
I'll post a proposal on the zodb-dev list.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope-Dev
mailing list