@receiver(connection_created)
def configure_sqlite(sender, connection, **kwargs):
if connection.vendor == "sqlite":
cursor = connection.cursor()
cursor.execute("PRAGMA journal_mode = WAL;")
cursor.execute("PRAGMA busy_timeout = 5000;")
cursor.execute("PRAGMA synchronous = NORMAL;")
Last active
July 5, 2023 12:34
-
-
Save pvilas/8fdb90a0755cf1e16a0bc23fb7363cb7 to your computer and use it in GitHub Desktop.
Fer que sqlite3 pareixi concurrent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment