increase SQLite connection timeouts (#1173)

This commit is contained in:
Mike Fährmann 2020-12-19 20:15:07 +01:00
parent 465015f75a
commit 511d8d3fa3
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 2 additions and 2 deletions

View File

@ -210,6 +210,6 @@ try:
os.close(os.open(dbfile, os.O_CREAT | os.O_RDONLY, 0o600))
DatabaseCacheDecorator.db = sqlite3.connect(
dbfile, timeout=30, check_same_thread=False)
dbfile, timeout=60, check_same_thread=False)
except (OSError, TypeError, sqlite3.OperationalError):
cache = memcache # noqa: F811

View File

@ -956,7 +956,7 @@ class PathFormat():
class DownloadArchive():
def __init__(self, path, extractor):
con = sqlite3.connect(path)
con = sqlite3.connect(path, timeout=60, check_same_thread=False)
con.isolation_level = None
self.close = con.close
self.cursor = con.cursor()