Changeset - d3f701d912bd
[Not reviewed]
celery
0 1 0
Marcin Kuzminski - 15 years ago 2010-09-17 23:57:22
marcin@python-works.com
fixed up celeryconfig, to get results database from config files
1 file changed with 4 insertions and 7 deletions:
0 comments (0 inline, 0 general)
celeryconfig.py
Show inline comments
 
@@ -2,23 +2,20 @@
 
import sys
 
import os
 
import ConfigParser
 
root = os.getcwd()
 

	
 
PYLONS_CONFIG_NAME = 'test.ini'
 
PYLONS_CONFIG_NAME = 'development.ini'
 

	
 
root = os.getcwd()
 
sys.path.append(root)
 
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",)
 

	
 
## Result store settings.
 
CELERY_RESULT_BACKEND = "database"
 
CELERY_RESULT_DBURI = "sqlite:///hg_app.db"
 
CELERY_RESULT_DBURI = dict(config.items('app:main'))['sqlalchemy.db1.url']
 

	
 
BROKER_CONNECTION_MAX_RETRIES = 30
 

	
0 comments (0 inline, 0 general)