diff options
Diffstat (limited to 'indexer.py')
-rw-r--r-- | indexer.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -77,6 +77,7 @@ def process_file(filepath): print u"{0} processing {1}".format(os.getpid(), filepath) inputfile = pyPdf.PdfFileReader(file(filepath, 'r')) title = inputfile.getDocumentInfo().title + writer_metadata = index_metadata.writer() writer_metadata.add_document(title=title, path=filepath, createtime=time.time()) writer_metadata.commit() @@ -110,7 +111,8 @@ except KeyboardInterrupt: pool.terminate() except ImportError: for filepath in filepaths: - process_file(filepath) + #if process_file(filepath) == "KeyboardInterrupt": + break print u"optimize indexes" index_metadata.optimize() index_metadata.close() |