Add database_opts to example config

This commit is contained in:
Tulir Asokan 2022-03-25 21:04:28 +02:00
parent fe8658ebc1
commit c4f9a3bdf5
2 changed files with 9 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class Config(BaseFileConfig):
base = helper.base
copy = helper.copy
copy("database")
copy("database_opts")
if isinstance(self["crypto_database"], dict):
if self["crypto_database.type"] == "postgres":
base["crypto_database"] = self["crypto_database.postgres_uri"]

View File

@ -8,6 +8,14 @@ database: sqlite:///maubot.db
# Separate database URL for the crypto database. "default" means use the same database as above.
crypto_database: default
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
# https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
# For sqlite, min_size is used as the connection thread pool size and max_size is ignored.
database_opts:
min_size: 1
max_size: 10
plugin_directories:
# The directory where uploaded new plugins should be stored.
upload: ./plugins