chore: update outdated readmes (#2131)
This commit is contained in:
parent
cfd6a6291f
commit
45a131b668
|
@ -1,102 +1,21 @@
|
|||
# libretime-analyzer
|
||||
# LibreTime Analyzer
|
||||
|
||||
libretime-analyzer is a daemon that processes LibreTime file uploads as background jobs.
|
||||
LibreTime Analyzer is a service that analyze file as background jobs and move them into the storage.
|
||||
|
||||
It performs metadata extraction using Mutagen and moves uploads into LibreTime's
|
||||
music library directory (stor/imported).
|
||||
|
||||
libretime-analyzer uses process isolation to make it resilient to crashes and runs in
|
||||
a multi-tenant environment with no modifications.
|
||||
|
||||
## Installation
|
||||
## Development
|
||||
|
||||
```bash
|
||||
python setup.py install
|
||||
# Install dependencies
|
||||
make install
|
||||
# Activate the development environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Run linters
|
||||
make lint
|
||||
|
||||
# Run tests
|
||||
make test
|
||||
|
||||
# See the Makefile for more commands
|
||||
cat Makefile
|
||||
```
|
||||
|
||||
You will need to allow the "airtime" RabbitMQ user to access all exchanges and queues within the /airtime vhost:
|
||||
|
||||
```bash
|
||||
rabbitmqctl set_permissions -p /airtime airtime .\* .\* .\*
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This program must run as a user with permissions to write to your Airtime music library
|
||||
directory. For standard Airtime installations, run it as the libretime user:
|
||||
|
||||
```bash
|
||||
sudo -u libretime libretime-analyzer --daemon
|
||||
```
|
||||
|
||||
Or during development, add the --debug flag for more verbose output:
|
||||
|
||||
```bash
|
||||
sudo -u libretime libretime-analyzer --debug
|
||||
```
|
||||
|
||||
To print usage instructions, run:
|
||||
|
||||
```bash
|
||||
libretime-analyzer --help
|
||||
```
|
||||
|
||||
This application can be run as a daemon by running:
|
||||
|
||||
```bash
|
||||
libretime-analyzer -d
|
||||
```
|
||||
|
||||
# Developers
|
||||
|
||||
For development, you want to install libretime-analyzer system-wide but with everything symlinked back to the source
|
||||
directory for convenience. This is super easy to do, just run:
|
||||
|
||||
```bash
|
||||
pip install -r requirements-dev.txt
|
||||
pip install --editable .
|
||||
```
|
||||
|
||||
To send an test message to libretime-analyzer, you can use the message_sender.php script in the tools directory.
|
||||
For example, run:
|
||||
|
||||
```bash
|
||||
php tools/message_sender.php '{ "tmp_file_path" : "foo.mp3", "final_directory" : ".", "callback_url" : "http://localhost/rest/media/1", "api_key" : "YOUR_API_KEY" }'
|
||||
|
||||
php tools/message_sender.php '{"tmp_file_path":"foo.mp3", "import_directory":"/srv/airtime/stor/imported/1","original_filename":"foo.mp3","callback_url": "http://localhost/rest/media/1", "api_key":"YOUR_API_KEY"}'
|
||||
```
|
||||
|
||||
## Logging
|
||||
|
||||
By default, logs are saved to:
|
||||
|
||||
```
|
||||
/var/log/airtime/airtime_analyzer.log
|
||||
```
|
||||
|
||||
This application takes care of rotating logs for you.
|
||||
|
||||
## Unit Tests
|
||||
|
||||
To run the unit tests, execute:
|
||||
|
||||
```bash
|
||||
nosetests
|
||||
```
|
||||
|
||||
If you care about seeing console output (stdout), like when you're debugging or developing
|
||||
a test, run:
|
||||
|
||||
```bash
|
||||
nosetests -s
|
||||
```
|
||||
|
||||
To run the unit tests and generate a code coverage report, run:
|
||||
|
||||
```bash
|
||||
nosetests --with-coverage --cover-package=airtime_analyzer
|
||||
```
|
||||
|
||||
## Running in a Multi-Tenant Environment
|
||||
|
||||
## History and Design Motivation
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
# LibreTime Playout
|
||||
|
||||
LibreTime Playout is a service that will ingest a schedule and stream it.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
make install
|
||||
# Activate the development environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Run linters
|
||||
make lint
|
||||
|
||||
# Run tests
|
||||
make test
|
||||
|
||||
# See the Makefile for more commands
|
||||
cat Makefile
|
||||
```
|
||||
|
||||
## History
|
||||
|
||||
This tool was born out of a collaboration between Open Broadcast and Sourcefabric.
|
||||
|
|
|
@ -1,51 +1,21 @@
|
|||
# airtime-celery
|
||||
# LibreTime Worker
|
||||
|
||||
airtime-celery is a [Celery](https://docs.celeryq.dev/) daemon for handling backend tasks asynchronously. Communication and the Celery results backend are both handled with amqp (RabbitMQ).
|
||||
LibreTime Worker is a service that will run background tasks.
|
||||
|
||||
# Installation
|
||||
## Development
|
||||
|
||||
```sh
|
||||
sudo python3 setup.py install
|
||||
```bash
|
||||
# Install dependencies
|
||||
make install
|
||||
# Activate the development environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Run linters
|
||||
make lint
|
||||
|
||||
# Run tests
|
||||
make test
|
||||
|
||||
# See the Makefile for more commands
|
||||
cat Makefile
|
||||
```
|
||||
|
||||
Each instance of airtime-celery has its own worker, and multiple instances can be run in parallel. [Celery is thread-safe](https://docs.celeryq.dev/en/latest/userguide/application.html), so this parallelization won't cause conflicts.
|
||||
|
||||
# Developers
|
||||
|
||||
To debug, you can run celery directly from the command line:
|
||||
|
||||
```sh
|
||||
RMQ_CONFIG_FILE=${LIBRETIME_CONF_DIR}/config.yml celery -A libretime_worker.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
|
||||
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/config.yml 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.
|
||||
|
|
Loading…
Reference in New Issue