From 6c91093cacd0e4ebcdfd1bca7c79dc906527b94c Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 19 Nov 2010 23:47:22 +0100 Subject: prettify output; only one pdf thread --- index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.py b/index.py index 5a37008..3758233 100644 --- a/index.py +++ b/index.py @@ -65,11 +65,12 @@ class IndexWorker(Thread): doc = documents.get(True, 0.5) except Empty: continue + print u"{0} adding {1}".format(self.name, doc['path']) writer = index.writer() writer.add_document(**doc) + writer.commit() documents.task_done() print u"{0} added {1}".format(self.name, doc['path']) - writer.commit() threads = map(lambda i: PDFWorker(), range(1)) for thread in threads: -- cgit v1.2.1