From 31c0b870884823d6c08bbdccfbec8e001d56fd08 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 22 Apr 2011 10:34:31 -0600 Subject: [PATCH] ... --- src/calibre/ebooks/metadata/sources/identify.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/sources/identify.py b/src/calibre/ebooks/metadata/sources/identify.py index b427f19952..bc9070852b 100644 --- a/src/calibre/ebooks/metadata/sources/identify.py +++ b/src/calibre/ebooks/metadata/sources/identify.py @@ -42,6 +42,10 @@ class Worker(Thread): self.log.exception('Plugin', self.plugin.name, 'failed') self.plugin.dl_time_spent = time.time() - start + @property + def name(self): + return self.plugin.name + def is_worker_alive(workers): for w in workers: if w.is_alive(): @@ -348,7 +352,11 @@ def identify(log, abort, # {{{ if (first_result_at is not None and time.time() - first_result_at > wait_time): - log('Not waiting any longer for more results') + log.warn('Not waiting any longer for more results. Still running' + ' sources:') + for worker in workers: + if worker.is_alive(): + log.debug('\t' + worker.name) abort.set() break