[ZODB-Dev] afterCommitHook ?
Richard Shea
rshea at thecubagroup.com
Mon Aug 27 11:51:08 UTC 2012
On Fri, Aug 24, 2012, at 06:52 PM, Sylvain Viollon wrote:
>
> Op 24 aug 2012, om 01:11 heeft Richard Shea het volgende geschreven:
>
> Hello,
>
> > Hi - I hope zodb-dev is a reasonable place for this type of question, it
> > not perhaps you could redirect me to a better forum.
> >
>
> I believe it to be the right place.
>
> > I've come across references (eg http://bit.ly/NouF1e) to a
> > afterCommitHook but I can't find any documentation to it - can anyone
> > point me at some ?
> >
>
> There isn't much documentation on a site, as far as I know, but you
> can start
> by going in the ZODB code and read in the interfaces.py files the
> docstring of the
> interfaces, that defines the API. There is lot of information to be found
> there.
>
> > I also heard a reference (in a YouTube video) to a 'hook which monitors
> > objects coming out of ZODB to determine if they match the current
> > version' (I'm paraphrasing a bit but that what they meant). I wasn't
> > sure if this referred to a feature of ZODB or whether the person meant
> > hooking into a standard python method - any ideas on that one ?
> >
>
> I think he meant this method on the transaction object (that you can
> get with
> transaction.get):
>
> def addAfterCommitHook(hook, args=(), kws=None):
>
>
> You will find more information about this method in the interfaces.py
> file of the
> transaction package.
>
Thanks that was good. I was able to find it and understand the comments.
> Regards,
>
> Sylvain,
>
> --
> Sylvain Viollon -- Infrae
> t +31 10 243 7051 -- http://infrae.com
> Hoevestraat 10 3033GC Rotterdam -- The Netherlands
>
>
>
More information about the ZODB-Dev
mailing list