From f42840f9dd42addc2a47dccf33c205be04a18975 Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 2 Sep 2021 15:14:24 +0200 Subject: [PATCH] Rewrite celery README from .rst to .md --- python_apps/airtime-celery/README.md | 63 ++++++++++++++++++++++++++ python_apps/airtime-celery/README.rst | 65 --------------------------- 2 files changed, 63 insertions(+), 65 deletions(-) create mode 100644 python_apps/airtime-celery/README.md delete mode 100644 python_apps/airtime-celery/README.rst diff --git a/python_apps/airtime-celery/README.md b/python_apps/airtime-celery/README.md new file mode 100644 index 000000000..0d3b145a0 --- /dev/null +++ b/python_apps/airtime-celery/README.md @@ -0,0 +1,63 @@ +# airtime-celery + +airtime-celery is a [Celery](http://www.celeryproject.org/) daemon for handling backend tasks asynchronously. +Communication and the Celery results backend are both handled with amqp (RabbitMQ). + +# Installation + +```sh +sudo python setup.py install +``` + +Each instance of airtime-celery has its own worker, and multiple instances can be run in parallel. +[Celery is thread-safe](http://celery.readthedocs.org/en/latest/userguide/application.html), so this parallelization won't cause conflicts. + +# Usage + +This program must be run with sudo: + +```sh +sudo service airtime-celery {start | stop | restart | graceful | kill | dryrun | create-paths} +``` + +# Developers + +To debug, you can run celery directly from the command line: + +```sh +cd /my/airtime/root/python_apps/airtime-celery +RMQ_CONFIG_FILE=${LIBRETIME_CONF_DIR}/airtime.conf celery -A airtime-celery.tasks worker --loglevel=info +``` + +This worker can be run alongside the service without issue. + +You may want to use the setuptools develop target to install: + +```sh +cd /my/airtime/root/python_apps/airtime-celery +sudo python setup.py develop +``` + +You will need to allow the "airtime" RabbitMQ user to access all exchanges and queues within the /airtime vhost: + +```sh +sudo rabbitmqctl set_permissions -p /airtime airtime .\* .\* .\* +``` + +# Logging + +By default, logs are saved to: + +``` +/var/log/airtime/airtime-celery[-DEV_ENV].log +``` + +# Troubleshooting + +If you run into issues getting Celery to accept tasks from Airtime: + +1. Make sure Celery is running ($ sudo service airtime-celery status). +2. Check the log file (/var/log/airtime/airtime-celery[-DEV_ENV].log) to make sure Celery started correctly. +3. Check your $LIBRETIME_CONF_DIR/airtime.conf rabbitmq settings. Make sure the settings here align with $LIBRETIME_CONF_DIR/$ENVIRONMENT/rabbitmq.ini. +4. Check RabbitMQ to make sure the celeryresults and task queues were created in the correct vhost. +5. Make sure the RabbitMQ user (the default is airtime) has permissions on all vhosts being used. diff --git a/python_apps/airtime-celery/README.rst b/python_apps/airtime-celery/README.rst deleted file mode 100644 index b5cf464c5..000000000 --- a/python_apps/airtime-celery/README.rst +++ /dev/null @@ -1,65 +0,0 @@ -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 - -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 -========== - -To debug, you can run celery directly from the command line: - - $ cd /my/airtime/root/python_apps/airtime-celery - $ RMQ_CONFIG_FILE=${LIBRETIME_CONF_DIR}/airtime.conf celery -A airtime-celery.tasks worker --loglevel=info - -This worker can be run alongside the service without issue. - -You may want to use the setuptools develop target to install: - - $ cd /my/airtime/root/python_apps/airtime-celery - $ 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 - -Troubleshooting -=============== - -If you run into issues getting Celery to accept tasks from Airtime: - - 1) Make sure Celery is running ($ sudo service airtime-celery status). - - 2) Check the log file (/var/log/airtime/airtime-celery[-DEV_ENV].log) to make sure Celery started correctly. - - 3) Check your $LIBRETIME_CONF_DIR/airtime.conf rabbitmq settings. Make sure the settings here align with - $LIBRETIME_CONF_DIR/$ENVIRONMENT/rabbitmq.ini. - - 4) Check RabbitMQ to make sure the celeryresults and task queues were created in the correct vhost. - - 5) Make sure the RabbitMQ user (the default is airtime) has permissions on all vhosts being used.