From ccb8a234b8ec77d8295a1f74fc5f52702b410b2c Mon Sep 17 00:00:00 2001 From: jo Date: Fri, 24 Dec 2021 00:47:44 +0100 Subject: [PATCH] chore: fixes after libretime_worker rename --- legacy/build/airtime-setup/load.php | 2 +- worker/Makefile | 4 ++-- worker/README.md | 2 +- worker/install/systemd/libretime-celery.service | 2 +- worker/libretime_worker/__init__.py | 2 +- worker/setup.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/legacy/build/airtime-setup/load.php b/legacy/build/airtime-setup/load.php index b7ef45a63..1f68e090e 100644 --- a/legacy/build/airtime-setup/load.php +++ b/legacy/build/airtime-setup/load.php @@ -172,7 +172,7 @@ function checkLiquidsoapService() */ function checkCeleryService() { - exec('pgrep -f -u celery airtime-celery', $out, $status); + exec('pgrep -f -u celery libretime_worker', $out, $status); if (array_key_exists(0, $out) && $status == 0) { return 1; } diff --git a/worker/Makefile b/worker/Makefile index c160bb7e2..d784e7e79 100644 --- a/worker/Makefile +++ b/worker/Makefile @@ -3,8 +3,8 @@ all: lint include ../tools/python.mk PIP_INSTALL := --editable . -PYLINT_ARG := airtime-celery -MYPY_ARG := airtime-celery +PYLINT_ARG := libretime_worker +MYPY_ARG := libretime_worker format: .format lint: .format-check .pylint .mypy diff --git a/worker/README.md b/worker/README.md index 688a087b6..d8caac3c2 100644 --- a/worker/README.md +++ b/worker/README.md @@ -15,7 +15,7 @@ Each instance of airtime-celery has its own worker, and multiple instances can b To debug, you can run celery directly from the command line: ```sh -RMQ_CONFIG_FILE=${LIBRETIME_CONF_DIR}/airtime.conf celery -A airtime-celery.tasks worker --loglevel=info +RMQ_CONFIG_FILE=${LIBRETIME_CONF_DIR}/airtime.conf celery -A libretime_worker.tasks worker --loglevel=info ``` This worker can be run alongside the service without issue. diff --git a/worker/install/systemd/libretime-celery.service b/worker/install/systemd/libretime-celery.service index 06feda985..484d3e026 100644 --- a/worker/install/systemd/libretime-celery.service +++ b/worker/install/systemd/libretime-celery.service @@ -7,7 +7,7 @@ User=celery Group=celery Environment=RMQ_CONFIG_FILE=/etc/airtime/airtime.conf WorkingDirectory=/srv/airtime -ExecStart=/usr/local/bin/celery worker -A airtime-celery.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO +ExecStart=/usr/local/bin/celery worker -A libretime_worker.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO Restart=always [Install] diff --git a/worker/libretime_worker/__init__.py b/worker/libretime_worker/__init__.py index 81a44f04f..1387a24de 100644 --- a/worker/libretime_worker/__init__.py +++ b/worker/libretime_worker/__init__.py @@ -1,4 +1,4 @@ import os # Make the celeryconfig module visible to celery -os.environ["CELERY_CONFIG_MODULE"] = "airtime-celery.celeryconfig" +os.environ["CELERY_CONFIG_MODULE"] = "libretime_worker.celeryconfig" diff --git a/worker/setup.py b/worker/setup.py index bdd751d8f..3adfb5051 100644 --- a/worker/setup.py +++ b/worker/setup.py @@ -17,7 +17,7 @@ setup( "Source Code": "https://github.com/libretime/libretime", }, license="MIT", - packages=["airtime-celery"], + packages=["libretime_worker"], python_requires=">=3.6", install_requires=[ "celery==4.4.7",