I ended up created a pyramid_celery app that has a paster command,
that way I could load up the database the same way (through main) and
then launch celeryd.

https://github.com/sontek/pyramid_celery

if anyone else needs it.

So you define a celeryconfig.py like:

CELERY_IMPORTS = ("app.tasks", )
CELERY_RESULT_BACKEND = "redis"CELERY_REDIS_HOST =
"localhost"CELERY_REDIS_PORT = 6379CELERY_REDIS_DB = 0BROKER_BACKEND =
"redis"BROKER_TRANSPORT = "redis"BROKER_HOST =
 CELERY_REDIS_HOSTBROKER_PORT = CELERY_REDIS_PORT

Then git clone https://github.com/sontek/pyramid_celery.git

Then run python setup.py develop

and in your main app you'll now have access to type paster celeryd ./
development.ini  and it'll launch celery for you with the database
configured.


On Nov 5, 7:05 am, John Anderson <son...@gmail.com> wrote:
> So I've been playing with celery configuration with Pyramid and I was
> wondering how you guys handle it?
>
> My problem right now is the best way to tell celery how to bind SQLAlchemy
> configuration.
>
> If I don't call initialize_sql inside my celeryconfig.py it doesn't get
> bound but I don't want to call initialize_sql from celeryconfig.py because
> its used both on the app side and to run celeryd.

I also played with creating a pyramid_celery library that would hook
in the configuration but I couldn't figure out the proper events/load
order to run so that the Loader could get the configuration it needed
but

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to