Changeset - 87943675813a
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2010-11-13 02:39:03
marcin@python-works.com
fixed whoosh indexing from admin panel
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -34,7 +34,8 @@ def get_session():
 
    if celery_on:
 
        from sqlalchemy import engine_from_config
 
        from sqlalchemy.orm import sessionmaker, scoped_session
 
        engine = engine_from_config(dict(config.items('app:main')), 'sqlalchemy.db1.')
 
        engine = engine_from_config(dict(config.items('app:main')),
 
                                    'sqlalchemy.db1.')
 
        sa = scoped_session(sessionmaker(bind=engine))
 
    else:
 
        #If we don't use celery reuse our current application Session
 
@@ -48,7 +49,7 @@ def get_session():
 
def whoosh_index(repo_location, full_index):
 
    log = whoosh_index.get_logger()
 
    from rhodecode.lib.indexers.daemon import WhooshIndexingDaemon
 
    index_location = ''
 
    index_location = dict(config.items('app:main'))['index_dir']
 
    WhooshIndexingDaemon(index_location=index_location,
 
                         repo_location=repo_location).run(full_index=full_index)
 

	
0 comments (0 inline, 0 general)