[ZODB-Dev] afterCommitHook ?
Sylvain Viollon
sylvain at infrae.com
Fri Aug 24 06:52:26 UTC 2012
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.
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