On Tue, Nov 8, 2011 at 6:59 AM, Michael Bayer <mike...@zzzcomputing.com> wrote: > OK, here's my attempt. Takes place pretty much at the pool level and is > not too intrusive, also leaves in place all the existing reconnect stuff > which should just work as is, not to mention leaves "creator()" in place > which also has some exception handling. I'm hoping you can test it out > and grok the general idea in case it needs adjustment, and if we can write > full tests it can be part of the distribution too, maybe as an ext.
Oh wow, thanks a lot Michael. That looks much cleaner. I'll integrate it in our codebase and see if I can complete the tests. We will bench it in our infra to see how it goes with the real Sync app/data. For the reconnect stuff, I am not sure to understand how things currently work: in case of a connection error in MySQL (2013 and the likes) the engine.execute() method will throw the error and unless I have done things wrong, the error bubbles up and the pool does not attempt to recreate a new connection and run the query again. The small block I have here: https://hg.mozilla.org/services/server-core/file/2.6.1/services/util.py#l621 Does exactly this. Cheers Tarek -- Tarek Ziadé | http://ziade.org -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.