Celery backend and support for dev-env worker parallelization
This commit is contained in:
parent
c1b5b53a16
commit
15c7ef5885
17 changed files with 1664 additions and 368 deletions
49
python_apps/airtime-celery/README.rst
Normal file
49
python_apps/airtime-celery/README.rst
Normal file
|
@ -0,0 +1,49 @@
|
|||
airtime-celery
|
||||
==============
|
||||
|
||||
airtime-celery is a Celery_ daemon for handling backend tasks asynchronously.
|
||||
Communication and the Celery results backend are both handled with amqp (RabbitMQ).
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
$ sudo python setup.py install
|
||||
|
||||
To install the configuration and upstart files for all environments (development and production)
|
||||
|
||||
$ sudo python setup.py install --all-envs
|
||||
|
||||
You can also specify a single environment to deploy config and upstart files for:
|
||||
|
||||
$ sudo python setup.py install --dev-env=bananas
|
||||
|
||||
Each instance of airtime-celery has its own worker, and multiple instances can be run in parallel.
|
||||
`Celery is thread-safe`_, so this parallelization won't cause conflicts.
|
||||
|
||||
.. _Celery: http://www.celeryproject.org/
|
||||
.. _Celery is thread-safe: http://celery.readthedocs.org/en/latest/userguide/application.html
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
This program must be run with sudo:
|
||||
|
||||
$ sudo service airtime-celery {start | stop | restart | graceful | kill | dryrun | create-paths}
|
||||
|
||||
Developers
|
||||
==========
|
||||
|
||||
You may want to use the setuptools develop target to install:
|
||||
|
||||
$ sudo python setup.py develop
|
||||
|
||||
You will need to allow the "airtime" RabbitMQ user to access all exchanges and queues within the /airtime vhost:
|
||||
|
||||
$ sudo rabbitmqctl set_permissions -p /airtime airtime .\* .\* .\*
|
||||
|
||||
Logging
|
||||
=======
|
||||
|
||||
By default, logs are saved to:
|
||||
|
||||
/var/log/airtime/airtime-celery[-DEV_ENV].log
|
Loading…
Add table
Add a link
Reference in a new issue