mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-27 05:28:23 +00:00
Try WAL mode
This commit is contained in:
parent
04b5e1a7d3
commit
2e331cbd73
1 changed files with 3 additions and 2 deletions
|
@ -77,6 +77,9 @@ with conn:
|
||||||
|
|
||||||
create_tables()
|
create_tables()
|
||||||
|
|
||||||
|
# enable WAL mode
|
||||||
|
c.execute('PRAGMA journal_mode=WAL;')
|
||||||
|
|
||||||
# Parse the log file.
|
# Parse the log file.
|
||||||
for line in open(logfile):
|
for line in open(logfile):
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
|
@ -87,5 +90,3 @@ with conn:
|
||||||
|
|
||||||
sql = "INSERT INTO gravity (domain) VALUES (?)"
|
sql = "INSERT INTO gravity (domain) VALUES (?)"
|
||||||
c.execute(sql, (line,))
|
c.execute(sql, (line,))
|
||||||
|
|
||||||
conn.commit()
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue