mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix FTS indexing not progressing when dirtied books have no actual changes
This commit is contained in:
parent
74ec8db8fc
commit
634bb31f24
@ -520,7 +520,9 @@ class Cache:
|
||||
h.update(chunk)
|
||||
pt.write(chunk)
|
||||
with self.write_lock:
|
||||
self.backend.queue_fts_job(book_id, fmt, pt.name, sz, h.hexdigest())
|
||||
queued = self.backend.queue_fts_job(book_id, fmt, pt.name, sz, h.hexdigest())
|
||||
if not queued: # means a dirtied book was removed
|
||||
self._update_fts_indexing_numbers()
|
||||
return self.backend.fts_has_idle_workers
|
||||
|
||||
def loop_while_more_available():
|
||||
|
@ -171,7 +171,7 @@ class Pool:
|
||||
|
||||
@property
|
||||
def num_of_idle_workers(self):
|
||||
return sum(1 if w.working else 0 for w in self.workers)
|
||||
return sum(0 if w.working else 1 for w in self.workers)
|
||||
|
||||
def check_for_work(self):
|
||||
self.initialize()
|
||||
|
Loading…
x
Reference in New Issue
Block a user