From 8ebbecdeab595766e659a0116245da8a925bdfeb Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Thu, 27 Oct 2011 15:34:31 +0200 Subject: [PATCH] index indictor --- apps/search/index.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/search/index.py b/apps/search/index.py index d539257ee..f5489a5ca 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -9,6 +9,7 @@ from lucene import SimpleFSDirectory, IndexWriter, File, Field, \ HashSet, BooleanClause, Term, CharTermAttribute, \ PhraseQuery, StringReader # KeywordAnalyzer +import sys import os import errno from librarian import dcparser @@ -268,8 +269,13 @@ class ReusableIndex(Index): @staticmethod def close_reusable(): if ReusableIndex.index is not None: + all_jobs = len(ReusableIndex.pool_jobs) + waited=1 for job in ReusableIndex.pool_jobs: + sys.stdout.write("\rWaiting for search index job: %d/%d..." % job.wait() + waited+=1 + print("Indexing done.") ReusableIndex.pool.close() ReusableIndex.index.optimize() -- 2.20.1