prefect.server.database.configurations
ConnectionTracker
clear
on_close
on_close_detached
on_connect
track_pool
BaseDatabaseConfiguration
begin_transaction
create_db
drop_db
engine
is_inmemory
session
unique_key
AsyncPostgresConfiguration
begin_transaction
begin_transaction
create_db
create_db
drop_db
drop_db
engine
connection_url
: The database connection string.
Defaults to self.connection_urlecho
: Whether to echo SQL sent
to the database. Defaults to self.echotimeout
: The database statement timeout, in seconds.
Defaults to self.timeoutengine
is_inmemory
is_inmemory
schedule_engine_disposal
add_event_loop_shutdown_callback
.
We attempted to lazily clean up old engines when new engines are created, but
if the loop the engine is attached to is already closed then the connections
cannot be cleaned up properly and warnings are displayed.
Engine disposal should only be important when running the application
ephemerally. Notably, this is an issue in our tests where many short-lived event
loops and engines are created which can consume all of the available database
connection slots. Users operating at a scale where connection limits are
encountered should be encouraged to use a standalone server.
session
engine
: a sqlalchemy enginesession
unique_key
AioSqliteConfiguration
begin_sqlite_conn
begin_sqlite_stmt
begin_transaction
begin_transaction
create_db
create_db
drop_db
drop_db
engine
connection_url
: The database connection string.
Defaults to self.connection_urlecho
: Whether to echo SQL sent
to the database. Defaults to self.echotimeout
: The database statement timeout, in seconds.
Defaults to self.timeoutengine
is_inmemory
is_inmemory
schedule_engine_disposal
add_event_loop_shutdown_callback
.
We attempted to lazily clean up old engines when new engines are created, but
if the loop the engine is attached to is already closed then the connections
cannot be cleaned up properly and warnings are displayed.
Engine disposal should only be important when running the application
ephemerally. Notably, this is an issue in our tests where many short-lived event
loops and engines are created which can consume all of the available database
connection slots. Users operating at a scale where connection limits are
encountered should be encouraged to use a standalone server.
session
engine
: a sqlalchemy enginesession
setup_sqlite
unique_key