On Aug 24, 2009, at 2:58 PM, Garret Heaton wrote:
There is a solution to the reconnection issue posted here which one
of my friends improved upon. He wasn't on the list at the time of
this posting so I'm replying to this on his behalf. The improved
solution is:
[snip]
# try the interaction again
return adbapi.ConnectionPool._runInteraction(self,
interaction, *args, **kw)
The thing that would concern me is that you can get a ConnectionLost
error for a variety of different reasons, and they might not be raised
by the first query issued in your interaction.
I feel like I can think of any number of ways running the same series
of queries twice would be a bad thing. I have some very important
queries that are run inside a interaction because they do a series of
operations in sequence. I can't use transactions because my tables are
MyISAM.
Perhaps I'm jumping at shadows, but automatic re-querying just seems
dangerous to me. Only the particular application knows when it's safe.
-phil
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python