lacre.repositories: Configure SQLAlchemy connection pooling #136

Merged
pfm merged 8 commits from connection-pooling into main 2024-01-04 19:52:04 +01:00
Collaborator

Provide 3 new configuration parameters in database section:

  • max_connection_age --- number of seconds before an idle connection is
    "recycled", i.e. replaced with a new one;

  • pool_size --- number of simultaneous connections kept in the pool;

  • max_overflow --- maximum number of simultaneous connections we could make to
    the database.

Update sample config, including links to documentation.

Provide 3 new configuration parameters in database section: - max_connection_age --- number of seconds before an idle connection is "recycled", i.e. replaced with a new one; - pool_size --- number of simultaneous connections kept in the pool; - max_overflow --- maximum number of simultaneous connections we could make to the database. Update sample config, including links to documentation.
pfm added 1 commit 2023-12-16 23:35:46 +01:00
Provide 3 new configuration parameters in database section:

- max_connection_age --- number of seconds before an idle connection is
  "recycled", i.e. replaced with a new one;

- pool_size --- number of simultaneous connections kept in the pool;

- max_overflow --- maximum number of simultaneous connections we could make to
  the database.

Update sample config, including links to documentation.
pfm added 1 commit 2023-12-17 14:07:18 +01:00
- Provide a new reuqired parameter: [database]pooling_mode and use it during
  SQLAlchemy engine initialisation.

- Update tests and configuration (including sample configuration).

- Adjust repository unit test to load config during setup.

- Pass an engine instance to repository constructors instead of connections.
  Engine keeps a connection pool and we rely on it.
pfm added 1 commit 2023-12-17 14:13:12 +01:00
pfm added 1 commit 2023-12-17 20:43:44 +01:00
Also: use PGPStyle in lacre.core.
pfm added 1 commit 2023-12-19 09:03:07 +01:00
pfm added 1 commit 2023-12-19 18:21:23 +01:00
pfm added 1 commit 2023-12-20 23:03:40 +01:00
- Don't re-configure lacre.notify logger.
- Issue more DEBUG logs when deleting keys.
pfm added 1 commit 2024-01-04 19:45:43 +01:00
pfm merged commit 748fd00957 into main 2024-01-04 19:52:04 +01:00
pfm deleted branch connection-pooling 2024-01-04 19:52:04 +01:00
Sign in to join this conversation.
No description provided.