increase SQLite connection timeouts (#1173)
This commit is contained in:
@@ -210,6 +210,6 @@ try:
|
|||||||
os.close(os.open(dbfile, os.O_CREAT | os.O_RDONLY, 0o600))
|
os.close(os.open(dbfile, os.O_CREAT | os.O_RDONLY, 0o600))
|
||||||
|
|
||||||
DatabaseCacheDecorator.db = sqlite3.connect(
|
DatabaseCacheDecorator.db = sqlite3.connect(
|
||||||
dbfile, timeout=30, check_same_thread=False)
|
dbfile, timeout=60, check_same_thread=False)
|
||||||
except (OSError, TypeError, sqlite3.OperationalError):
|
except (OSError, TypeError, sqlite3.OperationalError):
|
||||||
cache = memcache # noqa: F811
|
cache = memcache # noqa: F811
|
||||||
|
|||||||
@@ -956,7 +956,7 @@ class PathFormat():
|
|||||||
class DownloadArchive():
|
class DownloadArchive():
|
||||||
|
|
||||||
def __init__(self, path, extractor):
|
def __init__(self, path, extractor):
|
||||||
con = sqlite3.connect(path)
|
con = sqlite3.connect(path, timeout=60, check_same_thread=False)
|
||||||
con.isolation_level = None
|
con.isolation_level = None
|
||||||
self.close = con.close
|
self.close = con.close
|
||||||
self.cursor = con.cursor()
|
self.cursor = con.cursor()
|
||||||
|
|||||||
Reference in New Issue
Block a user