mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-21 22:17:59 +00:00
ignore thread warnings in the sqlite backend for now
This commit is contained in:
parent
815053c06f
commit
c2aa8c48bb
|
@ -17,7 +17,12 @@ if typing.TYPE_CHECKING:
|
|||
|
||||
def get_database(config: Config, migrate: bool = True) -> tinysql.Database:
|
||||
if config.db_type == "sqlite":
|
||||
db = tinysql.Database.sqlite(config.sqlite_path, connection_class = Connection)
|
||||
# todo: remove check_same_thread when tinysql stores connections per thread
|
||||
db = tinysql.Database.sqlite(
|
||||
config.sqlite_path,
|
||||
connection_class = Connection,
|
||||
check_same_thread = False
|
||||
)
|
||||
|
||||
elif config.db_type == "postgres":
|
||||
db = tinysql.Database.postgres(
|
||||
|
|
Loading…
Reference in a new issue