##// END OF EJS Templates
fixed whoosh indexing from admin panel
marcink -
r685:87943675 beta
parent child Browse files
Show More
@@ -34,7 +34,8 b' def get_session():'
34 if celery_on:
34 if celery_on:
35 from sqlalchemy import engine_from_config
35 from sqlalchemy import engine_from_config
36 from sqlalchemy.orm import sessionmaker, scoped_session
36 from sqlalchemy.orm import sessionmaker, scoped_session
37 engine = engine_from_config(dict(config.items('app:main')), 'sqlalchemy.db1.')
37 engine = engine_from_config(dict(config.items('app:main')),
38 'sqlalchemy.db1.')
38 sa = scoped_session(sessionmaker(bind=engine))
39 sa = scoped_session(sessionmaker(bind=engine))
39 else:
40 else:
40 #If we don't use celery reuse our current application Session
41 #If we don't use celery reuse our current application Session
@@ -48,7 +49,7 b' def get_session():'
48 def whoosh_index(repo_location, full_index):
49 def whoosh_index(repo_location, full_index):
49 log = whoosh_index.get_logger()
50 log = whoosh_index.get_logger()
50 from rhodecode.lib.indexers.daemon import WhooshIndexingDaemon
51 from rhodecode.lib.indexers.daemon import WhooshIndexingDaemon
51 index_location = ''
52 index_location = dict(config.items('app:main'))['index_dir']
52 WhooshIndexingDaemon(index_location=index_location,
53 WhooshIndexingDaemon(index_location=index_location,
53 repo_location=repo_location).run(full_index=full_index)
54 repo_location=repo_location).run(full_index=full_index)
54
55
General Comments 0
You need to be logged in to leave comments. Login now