Mercurial > kallithea
comparison rhodecode/lib/celerypylons/__init__.py @ 776:f6c613fba757 beta
Celery is configured by the .ini files and run from paster now
removed celeryconfig, added homebrew celery-pylons,
added paster celeryd command, fixed tasks to use pylons configs, sqlalchemy sessions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 27 Nov 2010 01:27:24 +0100 |
parents | |
children | ffd45b185016 |
comparison
equal
deleted
inserted
replaced
775:aaf2fc59a39a | 776:f6c613fba757 |
---|---|
1 """ | |
2 Automatically sets the environment variable `CELERY_LOADER` to | |
3 `celerypylons.loader:PylonsLoader`. This ensures the loader is | |
4 specified when accessing the rest of this package, and allows celery | |
5 to be installed in a webapp just by importing celerypylons:: | |
6 | |
7 import celerypylons | |
8 | |
9 """ | |
10 import os | |
11 import warnings | |
12 | |
13 CELERYPYLONS_LOADER = 'rhodecode.lib.celerypylons.loader.PylonsLoader' | |
14 if os.environ.get('CELERY_LOADER', CELERYPYLONS_LOADER) != CELERYPYLONS_LOADER: | |
15 warnings.warn("'CELERY_LOADER' environment variable will be overridden by celery-pylons.") | |
16 os.environ['CELERY_LOADER'] = CELERYPYLONS_LOADER |