# HG changeset patch # User Marcin Kuzminski # Date 2010-11-13 01:39:03 # Node ID 87943675813a3012b511d0f6e5923f3708c7ebce # Parent 2abb398cd9a74455fcfa147ff3ae422d77c5b524 fixed whoosh indexing from admin panel diff --git a/rhodecode/lib/celerylib/tasks.py b/rhodecode/lib/celerylib/tasks.py --- a/rhodecode/lib/celerylib/tasks.py +++ b/rhodecode/lib/celerylib/tasks.py @@ -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)