diff --git a/oml/db.py b/oml/db.py index 0f09ac4..409f4b5 100644 --- a/oml/db.py +++ b/oml/db.py @@ -11,7 +11,7 @@ from sqlalchemy.ext.declarative import declarative_base import settings 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)) metadata = MetaData() diff --git a/oml/item/icons.py b/oml/item/icons.py index 99c3a6a..fadb9ed 100644 --- a/oml/item/icons.py +++ b/oml/item/icons.py @@ -25,7 +25,7 @@ class Icons(dict): self.create() def connect(self): - conn = sqlite3.connect(self._db, timeout=10) + conn = sqlite3.connect(self._db, timeout=90) return conn def create(self):