looking at the current `engine.dispose()` (which I should have done 
sooner), that's pretty much what it's doing -- right?

https://bitbucket.org/zzzeek/sqlalchemy/src/55371f4cffa730f65f1b687e9f6287d2ac189227/lib/sqlalchemy/engine/base.py?at=master&fileviewer=file-view-default#base.py-1899:1923


        self.pool.dispose()        self.pool = self.pool.recreate()        
self.dispatch.engine_disposed(self)


or are you thinking of something that would not call the dispose(), this 
way the main process can keep that connection?

something like...

    original_pool = dbSession.connection().engine.detach()


   def *detach(self):
       """replaces the pool"""*

       old_pool = self.pool

       self.pool = self.pool.recreate()

return old_pool


Are the checked-out connections stored anywhere?  The 'Pool._all_connections' 
attribute seems to be more like '_idle_connections' or '_available_connections'

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to