Simplify database locking
Use a single lock for everything to ensure we don’t go inconsistent. One exception is the firewall nodes table which is only accessed when pushing updated config.
This commit is contained in:
parent
93458c4782
commit
22cec64bef
5 changed files with 19 additions and 18 deletions
|
@ -28,7 +28,7 @@ def create_app(test_config=None):
|
|||
}
|
||||
|
||||
from . import db
|
||||
with db.locked('settings'):
|
||||
with db.locked():
|
||||
settings |= db.read('settings')
|
||||
db.write('settings', settings)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue