engine disposal is discussed in-depth at 
https://docs.sqlalchemy.org/en/14/core/connections.html#engine-disposal , so if 
that section is not clarifying then I'd want to know how it can be improved.

your assertion would appear to be correct.


On Fri, Nov 11, 2022, at 12:53 PM, [email protected] wrote:
> I'm using the standard connection pool via engine:
> 
>     engine = sqlalchemy.create_engine('oracle://scott:tiger@foo', ...)
>     conn1 = engine.connect()
>     conn2 = engine.connect()
> 
> I want to dispose and recreate the pool in a web environment.
> 
> All new threads that connect should get a new connection from the pool. All 
> old threads that are using an old connection may continue to do so until they 
> close these connections out.
> 
> From what I understand, this is as simple as executing `engine.dispose()`.
> 
> Is that correct?
> 
> Thanks and best regards,
> 
> Matthew
> 
> 
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/def97e71-6d3e-4d28-a001-3aafd583ce5an%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy/def97e71-6d3e-4d28-a001-3aafd583ce5an%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/3671ce9f-60cb-4217-952e-a5c315df1fbd%40app.fastmail.com.

Reply via email to