Re: Re: query about after commit hook

Thierry Florac <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPX_VWApySJjKZB=2DeJD6nKeKVK+07eg6t5T4EqDUPx7z+VvQ@mail.gmail.com>
Hi,
I often use "after commit hooks" to handle actions which are not
"transaction aware" (for example, to do an update on a file system or on a
remote server).
If I want to make these updates only if my transaction is committed, how
can I do it without using these hooks ?

Best regards,
Thierry

2016-05-20 9:16 GMT+02:00 Sanjay Rao <[email protected]>:

>
> *IMO, after commit hooks are largely bug magnets that should be ignored by
> almost all users. *
>
> Do you mean that we should not use "after-commit-hook" ???
>
>
> On Thursday, 19 May 2016 18:03:31 UTC+5:30, Sanjay Rao wrote:
>>
>> Hi,
>>
>> Is this flow correct ?
>>
>> - Begin a new transaction
>> - Run a method (method1). method1 registers method2 as after-commit-hook
>> - Commit transaction
>> - method2 is called
>> - method2 raises exception
>> - begin a new transaction
>> - Call method3 and commit transaction
>>
>>
>> Regards,
>> Sanjay Rao
>>
> --
> You received this message because you are subscribed to the Google Groups
> "zodb" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.imagesdusport.com -- http://www.ztfy.org

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.