[Zope] How to commit a piece of data in a transaction when the transaction is being aborted later

Tino Wildenhain tino at wildenhain.de
Wed Jun 21 03:17:28 EDT 2006


William Heymann schrieb:
> On Tuesday 20 June 2006 12:47, Chris McDonough wrote:
> 
> 
>>I'd just record the data from Verisign in response to their POST (do
>>nothing else) and come along later with a separate request to pick
>>through the data to do postprocessing on it every so often; then the
>>data always gets recorded and you can deal with errors in your
>>postprocessing without needing to manage transaction state manually.
>>ClockServer can help with the "do something every so often" aspect of
>>this.
>>
> 
> 
> That is probably a good idea for long term to change things that way and I 
> would like to rewrite it. However right now I don't really want to rewrite 
> the way the current system works. I had hoped I could just use 
> get_transaction().commit() almost immediately after seeing the data from 
> Verisign. 

The problem is, there is no garanty about success of that transaction
either. So if it rolls back, what do you do with verysign?
Maybe a fifo logfile could solve your problem.

Regards
Tino


More information about the Zope mailing list