changeset 685:87943675813a beta

fixed whoosh indexing from admin panel
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 13 Nov 2010 02:39:03 +0100
parents 2abb398cd9a7
children ff6a8196ebfe
files rhodecode/lib/celerylib/tasks.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/tasks.py	Sat Nov 13 02:33:50 2010 +0100
+++ b/rhodecode/lib/celerylib/tasks.py	Sat Nov 13 02:39:03 2010 +0100
@@ -34,7 +34,8 @@
     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 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)