Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Oct 12, 2024
1 parent 9013177 commit 40f30d7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libhockeydata/hockeydatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ def MakeHockeyDatabase(sdbfile, synchronous=sqlite_synchronous, journal_mode=sql
sqlcur.execute("PRAGMA threads = "+str(multiprocessing.cpu_count())+";")
if (sdbfile != ":memory:"):
sqlcur.execute("PRAGMA journal_mode = "+str(journal_mode)+";")
journal_mode_test = sqlcur.fetchone()[0]
if journal_mode_test.lower() != "wal":
sqlcur.execute("PRAGMA journal_mode = DELETE;")
if (sdbfile == ":memory:"):
sqlcur.execute("PRAGMA journal_mode = MEMORY;")
sqlcur.execute("PRAGMA fullfsync = ON;")
Expand Down Expand Up @@ -518,6 +521,9 @@ def CreateHockeyDatabase(sdbfile, synchronous=sqlite_synchronous, journal_mode=s
sqlcur.execute("PRAGMA threads = "+str(multiprocessing.cpu_count())+";")
if (sdbfile != ":memory:"):
sqlcur.execute("PRAGMA journal_mode = "+str(journal_mode)+";")
journal_mode_test = sqlcur.fetchone()[0]
if journal_mode_test.lower() != "wal":
sqlcur.execute("PRAGMA journal_mode = DELETE;")
if (sdbfile == ":memory:"):
sqlcur.execute("PRAGMA journal_mode = MEMORY;")
sqlcur.execute("PRAGMA fullfsync = ON;")
Expand Down Expand Up @@ -566,6 +572,9 @@ def OpenHockeyDatabase(sdbfile, synchronous=sqlite_synchronous, journal_mode=sql
sqlcur.execute("PRAGMA threads = "+str(multiprocessing.cpu_count())+";")
if (sdbfile != ":memory:"):
sqlcur.execute("PRAGMA journal_mode = "+str(journal_mode)+";")
journal_mode_test = sqlcur.fetchone()[0]
if journal_mode_test.lower() != "wal":
sqlcur.execute("PRAGMA journal_mode = DELETE;")
if (sdbfile == ":memory:"):
sqlcur.execute("PRAGMA journal_mode = MEMORY;")
sqlcur.execute("PRAGMA fullfsync = ON;")
Expand Down

0 comments on commit 40f30d7

Please sign in to comment.