Fix #415, fix sqlite-index error

This commit is contained in:
2023-09-16 09:43:55 -04:00
parent 8fdb832c85
commit a19ec3305a
10 changed files with 38 additions and 36 deletions

View File

@@ -243,7 +243,7 @@ class Sist2:
self.bin_path = bin_path
self._data_dir = data_directory
def index(self, options: IndexOptions, search_backend: Sist2SearchBackend, logs_cb):
def index(self, options: IndexOptions, search_backend: Sist2SearchBackend, logs_cb, set_pid_cb):
args = [
self.bin_path,
@@ -255,6 +255,8 @@ class Sist2:
logs_cb({"sist2-admin": f"Starting sist2 command with args {args}"})
proc = Popen(args, stdout=PIPE, stderr=PIPE)
set_pid_cb(proc.pid)
t_stderr = Thread(target=self._consume_logs_stderr, args=(logs_cb, proc))
t_stderr.start()