mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -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
|
path = "sqlite:///" + path
|
||||||
if pool:
|
if pool:
|
||||||
# open and lock connection for single use
|
# 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:
|
else:
|
||||||
# no pool & concurrent access w/ timeout
|
# no pool & concurrent access w/ timeout
|
||||||
engine = create_engine(path,
|
engine = create_engine(path,
|
||||||
|
|
Loading…
Reference in a new issue