mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-06 08:56:51 -04:00
Fix pooling typo
eng -> engine
Fixes: #4526
Change-Id: If117099b8521e15887ae916a5dbfcfa0b7cd594b
(cherry picked from commit 66373c5811)
This commit is contained in:
Vendored
+4
-4
@@ -378,12 +378,12 @@ connections from the pool so that it makes all new ones. Below is
|
||||
a simple version using ``multiprocessing.Process``, but this idea
|
||||
should be adapted to the style of forking in use::
|
||||
|
||||
eng = create_engine("...")
|
||||
engine = create_engine("...")
|
||||
|
||||
def run_in_process():
|
||||
eng.dispose()
|
||||
engine.dispose()
|
||||
|
||||
with eng.connect() as conn:
|
||||
with engine.connect() as conn:
|
||||
conn.execute("...")
|
||||
|
||||
p = Process(target=run_in_process)
|
||||
@@ -396,7 +396,7 @@ This is a little more magical but probably more foolproof::
|
||||
from sqlalchemy import exc
|
||||
import os
|
||||
|
||||
eng = create_engine("...")
|
||||
engine = create_engine("...")
|
||||
|
||||
@event.listens_for(engine, "connect")
|
||||
def connect(dbapi_connection, connection_record):
|
||||
|
||||
Reference in New Issue
Block a user