Mercurial > public > src > rhodecode
diff celeryconfig.py @ 527:a9e50dce3081 celery
Removed config names from whoosh and celery,
celery is now configured based on the config name it's using
on celeryconfig. And whoosh uses it's own logger configured just for whoosh
Test creates a fresh whoosh index now, for more accurate checks
fixed tests for searching
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 17 Sep 2010 22:54:30 +0200 |
parents | a3d9d24acbec |
children | d3f701d912bd |
line wrap: on
line diff
--- a/celeryconfig.py Fri Sep 17 21:35:46 2010 +0200 +++ b/celeryconfig.py Fri Sep 17 22:54:30 2010 +0200 @@ -1,8 +1,20 @@ # List of modules to import when celery starts. import sys import os +import ConfigParser + +PYLONS_CONFIG_NAME = 'test.ini' + +root = os.getcwd() +config = ConfigParser.ConfigParser({'here':root}) +config.read('%s/%s' % (root, PYLONS_CONFIG_NAME)) +PYLONS_CONFIG = config + + +print config.items('app:main') + sys.path.append(os.getcwd()) -CELERY_IMPORTS = ("pylons_app.lib.celerylib.tasks", ) +CELERY_IMPORTS = ("pylons_app.lib.celerylib.tasks",) ## Result store settings. CELERY_RESULT_BACKEND = "database" @@ -30,4 +42,4 @@ #CELERY_ALWAYS_EAGER = True #rabbitmqctl add_user rabbitmq qweqwe #rabbitmqctl add_vhost rabbitmqhost -#rabbitmqctl set_permissions -p rabbitmqhost rabbitmq ".*" ".*" ".*" \ No newline at end of file +#rabbitmqctl set_permissions -p rabbitmqhost rabbitmq ".*" ".*" ".*"