Short version: How do I completely dispose of all resources belonging to an engine that uses a standard queue pool?
I have a Web service that creates a bunch of engines on demand (that all use the default QueuePool). It needs to close inactive connections after X seconds. I monitor access to these engines then `dispose` of them after X seconds of inactivity. (Note: I'm dealing with legacy architecture here; otherwise, I wouldn't choose to create all these engines.) The problem is that checked-out connections won't be closed and will be returned to their respective pools. The question then is, how do I clean up these connections? I've pored over the source code, the docs, and this list but can't find a clean, straightforward to accomplish complete disposal. I've looked at using `detach` on connections and using a checkin pool listener, to name a couple things, but I can't seem to find the right place to hook in to ensure all connections are closed. Has anyone out there found a way to accomplish complete disposal? On a related note, why is that pool listeners don't have access to the corresponding pool instance? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@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.