ignore thread warnings in the sqlite backend for now

This commit is contained in:
Izalia Mae 2024-01-24 19:20:27 -05:00
parent 815053c06f
commit c2aa8c48bb

View file

@ -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(