mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
use threadlocal for single user access
This commit is contained in:
parent
d44cbd5518
commit
6a8c19a889
1 changed files with 2 additions and 1 deletions
|
@ -2814,7 +2814,8 @@ class DeckStorage(object):
|
|||
path = "sqlite:///" + path
|
||||
if pool:
|
||||
# open and lock connection for single use
|
||||
engine = create_engine(path, connect_args={'timeout': 0})
|
||||
engine = create_engine(path, connect_args={'timeout': 0},
|
||||
strategy="threadlocal")
|
||||
else:
|
||||
# no pool & concurrent access w/ timeout
|
||||
engine = create_engine(path,
|
||||
|
|
Loading…
Reference in a new issue