drop progress handler and timeout arg

This commit is contained in:
Damien Elmes 2020-03-02 20:19:40 +10:00
parent 8ef28f8571
commit c8b9afac0c
2 changed files with 3 additions and 6 deletions

View file

@ -11,8 +11,8 @@ from typing import Any, List, Type
class DBProxy:
def __init__(self, path: str, timeout: int = 0) -> None:
self._db = sqlite.connect(path, timeout=timeout)
def __init__(self, path: str) -> None:
self._db = sqlite.connect(path, timeout=0)
self._path = path
self.mod = False
@ -69,9 +69,6 @@ class DBProxy:
self._db.text_factory = None
self._db.close()
def set_progress_handler(self, *args) -> None:
self._db.set_progress_handler(*args)
def __enter__(self) -> "DBProxy":
self._db.execute("begin")
return self

View file

@ -35,7 +35,7 @@ class ProgressManager:
"Install a handler in the current DB."
self.lastDbProgress = 0
self.inDB = False
db.set_progress_handler(self._dbProgress, 10000)
#db.set_progress_handler(self._dbProgress, 10000)
def _dbProgress(self):
"Called from SQLite."