increase db timeout
This commit is contained in:
parent
95af9f4f4a
commit
aac0a069d2
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ from sqlalchemy.ext.declarative import declarative_base
|
||||||
import settings
|
import settings
|
||||||
import state
|
import state
|
||||||
|
|
||||||
engine = create_engine('sqlite:////%s' % settings.db_path)
|
engine = create_engine('sqlite:////%s' % settings.db_path, connect_args={'timeout': 90})
|
||||||
Session = scoped_session(sessionmaker(bind=engine))
|
Session = scoped_session(sessionmaker(bind=engine))
|
||||||
|
|
||||||
metadata = MetaData()
|
metadata = MetaData()
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Icons(dict):
|
||||||
self.create()
|
self.create()
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
conn = sqlite3.connect(self._db, timeout=10)
|
conn = sqlite3.connect(self._db, timeout=90)
|
||||||
return conn
|
return conn
|
||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
|
|
Loading…
Reference in a new issue