Re: Flask-celery
- From:
- Joe Esposito
- Date:
- 2011-08-16 @ 01:26
Thanks, that did help. Good to have it all written in one place.
On Mon, Aug 8, 2011 at 7:06 AM, anh le <anhlh2@gmail.com> wrote:
> Hi Joe,
>
> It took me 3 days to get the example from flask-celery (the myapp.py) works
> on my linux box:
>
> Create a config file:
>
> 1. add config.py to example folder
>
> CELERY_RESULT_BACKEND = 'database'
> CELERY_RESULT_DBURI = 'sqlite:///myapp.sqlite'
>
> BROKER_HOST = "localhost"
> BROKER_PORT = 5672
> BROKER_VHOST = "/"
> BROKER_USER = "guest"
> BROKER_PASSWORD = "guest"
>
> 2. update myapp.py to use that config.py:
> ...
> app = create_app()
> app.config.from_pyfile('config.py')
> celery = Celery(app)
> ...
>
> 3. Config your rabbitmq to add vhost and user as in celery doc
>
> 4. Open a console and start rabbitmq-server
>
> 5. Open a console and start celeryd: python manage.py celeryd
>
> 6. Open another console and start flask web server: python myapp.py
>
> visit http://localhost:5000 to play around with 'add' task
>
> Hope that helps,
>
>
>
>
> On Sun, Aug 7, 2011 at 5:01 AM, Joe Esposito <espo58@gmail.com> wrote:
>
>> Hi, does anyone know of any start-to-finish tutorials for setting up
>> flask-celery on Linode?
>>
>> I've been swimming in both rabbitmq and celery configuration for the past
>> few hours and I feel like I haven't gotten anywhere.
>>
>> Much thanks.
>>
>>
>