Skip to content

Commit

Permalink
Add safety check before applying default synchronous
Browse files Browse the repository at this point in the history
Co-authored-by: Tulir Asokan <[email protected]>
  • Loading branch information
Fizzadar and tulir committed Nov 7, 2023
1 parent 1d8c2f4 commit 4c638f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mautrix/util/async_db/aiosqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _add_missing_pragmas(init_commands: list[str]) -> list[str]:
init_commands.append("PRAGMA foreign_keys = ON")
if not has_journal_mode:
init_commands.append("PRAGMA journal_mode = WAL")
if not has_synchronous:
if not has_synchronous and "PRAGMA journal_mode = WAL" in init_commands:
init_commands.append("PRAGMA synchronous = NORMAL")
if not has_busy_timeout:
init_commands.append("PRAGMA busy_timeout = 5000")
Expand Down

0 comments on commit 4c638f0

Please sign in to comment.