mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 20:24:36 +01:00
Make covercache and backup stoppable.
This commit is contained in:
parent
e3781d0f15
commit
3e1cb3b5e0
2 changed files with 4 additions and 2 deletions
|
|
@ -156,6 +156,8 @@ def col_idx(name):
|
|||
self.cover_cache.stop()
|
||||
self.cover_cache = CoverCache(db, FunctionDispatcher(self.db.cover))
|
||||
self.cover_cache.start()
|
||||
if self.metadata_backup is not None:
|
||||
self.metadata_backup.stop()
|
||||
self.metadata_backup = MetadataBackup(db)
|
||||
self.metadata_backup.start()
|
||||
def refresh_cover(event, ids):
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ def stop(self):
|
|||
def run(self):
|
||||
while self.keep_running:
|
||||
try:
|
||||
id_ = self.db.dirtied_queue.get()
|
||||
id_ = self.db.dirtied_queue.get(True, 2)
|
||||
except Empty:
|
||||
continue
|
||||
except:
|
||||
|
|
@ -122,7 +122,7 @@ def _image_for_id(self, id_):
|
|||
def run(self):
|
||||
while self.keep_running:
|
||||
try:
|
||||
id_ = self.load_queue.get()
|
||||
id_ = self.load_queue.get(True, 2)
|
||||
except Empty:
|
||||
continue
|
||||
except:
|
||||
|
|
|
|||
Loading…
Reference in a new issue