[Twisted-Python] long-lived database transaction

Bill Gribble grib at billgribble.com
Sat Dec 13 16:53:16 EST 2003


On Sat, 2003-12-13 at 14:55, Christopher Armstrong wrote:
> This looks like a gigantic rape'n'paste of adbapi.py. Isn't there a way 
> you can integrate with/refactor adbapi such that you don't duplicate all 
> that code?
> 
> Also, please create a "Feature"-level issue on the bug tracker for this 
> patch (especially since the patch needs discussion):
> 
>    http://twistedmatrix.com/bugs/

There's already a bug about this, # 303.  I submitted a patch for
similar functionality a while back.  After a couple go-rounds with Dave
P, I arrived at a satisfactory solution, which I then dropped the ball
on submitting :(  

I've been using it here for a couple of months with no problems.  I just
added a few calls to the existing adbapi api to get/commit transactions
and to call operations/queries in them. 

Attached is MY current patch to adbapi.py,, which I'm 92% happy with
(there are probably cleaner ways to handle the per-thread work queue).
Furthermore there aren't any tests.  I'd be happy to do a little more
work to clean it up and add tests if it's a decent base to work from. 

Thanks,
b.g.






-------------- next part --------------
A non-text attachment was scrubbed...
Name: adbdiff.out
Type: text/x-patch
Size: 6364 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031213/7e9c40c0/attachment.bin 


More information about the Twisted-Python mailing list