This is now an actual repo:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from twisted.enterprise import adbapi | |
| from twisted.python import log | |
| import MySQLdb | |
| class ReconnectingConnectionPool(adbapi.ConnectionPool): | |
| """Reconnecting adbapi connection pool for MySQL. | |
| This class improves on the solution posted at | |
| http://www.gelens.org/2008/09/12/reinitializing-twisted-connectionpool/ | |
| by checking exceptions by error code and only disconnecting the current |
NewerOlder