git://git.slightlycyberpunk.com
/
bdsm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01bc6f0
)
Updating sqlite3 processor to set journal_mode=wal to try to improve performance...
author
Brian Flowers
<git-admn@bsflowers.net>
Fri, 4 Nov 2016 20:55:55 +0000
(16:55 -0400)
committer
Brian Flowers
<git-admn@bsflowers.net>
Fri, 4 Nov 2016 20:55:55 +0000
(16:55 -0400)
etc/bdsm/processors/sqlite3.processor
patch
|
blob
|
history
diff --git
a/etc/bdsm/processors/sqlite3.processor
b/etc/bdsm/processors/sqlite3.processor
index
2b55f8d
..
557e241
100755
(executable)
--- a/
etc/bdsm/processors/sqlite3.processor
+++ b/
etc/bdsm/processors/sqlite3.processor
@@
-41,6
+41,11
@@
help()
start()
{
+ journal_mode="`sqlite3 $CONFIG_PATH/bdsm.db 'PRAGMA journal_mode;'`"
+ if [ "$journal_mode" != "wal" ]; then
+ sqlite3 $CONFIG_PATH/bdsm.db "PRAGMA journal_mode;"
+ fi
+
sqlite3 $CONFIG_PATH/bdsm.db "SELECT 1 FROM MEASUREMENTS" 2>/dev/null 1>&2
if [ $? -eq 1 ]; then
sqlite3 $CONFIG_PATH/bdsm.db \
@@
-67,7
+72,7
@@
stop()
status()
{
- running=`cat /home/bdsm/.processor.pid 2>/dev/null | \
+ running=`cat /home/bdsm/
pids/sqlite3
.processor.pid 2>/dev/null | \
xargs ps -T | \
grep -v PID | \
wc -l`