mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Change SQLite config to avoid locking
This commit is contained in:
parent
07725356b6
commit
040d447145
|
@ -166,6 +166,11 @@ class Database:
|
||||||
bind=self.__sql_engine, autoflush=False, expire_on_commit=False
|
bind=self.__sql_engine, autoflush=False, expire_on_commit=False
|
||||||
)
|
)
|
||||||
self.suffix_rx = re_compile(r"_\d+$")
|
self.suffix_rx = re_compile(r"_\d+$")
|
||||||
|
|
||||||
|
if sqlalchemy_string.startswith("sqlite"):
|
||||||
|
with self.__db_session() as session:
|
||||||
|
session.execute(text("PRAGMA journal_mode=WAL"))
|
||||||
|
session.commit()
|
||||||
|
|
||||||
def __del__(self) -> None:
|
def __del__(self) -> None:
|
||||||
"""Close the database"""
|
"""Close the database"""
|
||||||
|
|
Loading…
Reference in a new issue