From 2edbf15bf4329a3df7ef26ad06051d7d65424165 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Sat, 20 Aug 2022 08:13:30 +0200 Subject: [PATCH] feat(worker): rename service and package to libretime-worker (#2065) BREAKING CHANGE: The `libretime-celery` python package and service was renamed to `libretime-worker`. Make sure to remove the old python package and service. --- docs/admin-manual/setup/configuration.md | 8 ++++---- docs/admin-manual/setup/upgrade.md | 2 +- docs/admin-manual/troubleshooting.md | 3 ++- docs/admin-manual/uninstall.md | 3 ++- docs/releases/unreleased.md | 12 ++++++++++++ install | 4 ++-- installer/systemd/libretime.target | 2 +- legacy/application/check.php | 6 +++--- legacy/application/configs/config-check.php | 6 +++--- .../views/scripts/systemstatus/index.phtml | 6 +++--- ...etime-celery.service => libretime-worker.service} | 0 worker/setup.py | 4 ++-- 12 files changed, 35 insertions(+), 21 deletions(-) rename worker/install/systemd/{libretime-celery.service => libretime-worker.service} (100%) diff --git a/docs/admin-manual/setup/configuration.md b/docs/admin-manual/setup/configuration.md index c338ac100..1277661bb 100644 --- a/docs/admin-manual/setup/configuration.md +++ b/docs/admin-manual/setup/configuration.md @@ -31,10 +31,10 @@ general: In order to apply the changes made in this section, please restart the following services: ``` -libretime-api libretime-analyzer -libretime-celery +libretime-api libretime-playout +libretime-worker ``` ## Database @@ -110,10 +110,10 @@ rabbitmq: In order to apply the changes made in this section, please restart the following services: ``` -libretime-api libretime-analyzer -libretime-celery +libretime-api libretime-playout +libretime-worker ``` ## Playout diff --git a/docs/admin-manual/setup/upgrade.md b/docs/admin-manual/setup/upgrade.md index 059632329..25d83ae7d 100644 --- a/docs/admin-manual/setup/upgrade.md +++ b/docs/admin-manual/setup/upgrade.md @@ -20,9 +20,9 @@ sudo systemctl stop libretime.target # Or sudo systemctl stop libretime-analyzer.service sudo systemctl stop libretime-api.service -sudo systemctl stop libretime-celery.service sudo systemctl stop libretime-liquidsoap.service sudo systemctl stop libretime-playout.service +sudo systemctl stop libretime-worker.service ``` ## Make a backup diff --git a/docs/admin-manual/troubleshooting.md b/docs/admin-manual/troubleshooting.md index fb6cb584d..453e5295d 100644 --- a/docs/admin-manual/troubleshooting.md +++ b/docs/admin-manual/troubleshooting.md @@ -23,7 +23,7 @@ If a service isn't running, you should search for details using the tool running On a common setup, you should use the systemd service status: ```bash -sudo systemctl status libretime-celery +sudo systemctl status libretime-worker ``` :::note @@ -51,6 +51,7 @@ On a common setup, to access LibreTime specific logs you should search for the f - The `/var/log/libretime/legacy.log` file contains logs from the legacy app, - The `/var/log/libretime/liquidsoap.log` file contains logs from liquidsoap, - The `/var/log/libretime/playout.log` file contains logs from playout. +- The `/var/log/libretime/worker.log` file contains logs from the worker. For some LibreTime services, you can set a higher log level using the `LIBRETIME_LOG_LEVEL` environment variable, or by running the service by hand and using a command line flag: diff --git a/docs/admin-manual/uninstall.md b/docs/admin-manual/uninstall.md index e458464f2..c22717f5c 100644 --- a/docs/admin-manual/uninstall.md +++ b/docs/admin-manual/uninstall.md @@ -78,9 +78,10 @@ sudo pip3 uninstall \ libretime-analyzer \ libretime-api \ libretime-api-client \ + libretime-celery \ libretime-playout \ libretime-shared \ - libretime-celery + libretime-worker # Check if we forgot old python packages. # Remove packages that show up with this commands. diff --git a/docs/releases/unreleased.md b/docs/releases/unreleased.md index 5e0b2b8a6..4c88386a8 100644 --- a/docs/releases/unreleased.md +++ b/docs/releases/unreleased.md @@ -38,6 +38,18 @@ Along with the Debian Buster deprecation, the following dependencies versions ar ## :arrow_up: Upgrading +### Worker python package and service + +The `libretime-celery` python package and service was renamed to `libretime-worker`. Make sure to remove the old python package and service using the following command: + +```bash +sudo pip3 uninstall libretime-celery + +sudo rm -f \ + /etc/systemd/system/libretime-celery.service \ + /usr/lib/systemd/system/libretime-celery.service +``` + ## :warning: Known issues The following issues may need a workaround for the time being. Please search the [issues](https://github.com/libretime/libretime/issues) before reporting problems not listed below. diff --git a/install b/install index be0edabbe..0562fffca 100755 --- a/install +++ b/install @@ -591,10 +591,10 @@ section "Worker" install_python_app "$SCRIPT_DIR/worker" -info "creating libretime-celery working directory" +info "creating libretime-worker working directory" mkdir_and_chown "$LIBRETIME_USER" "$WORKING_DIR/worker" -install_service "libretime-celery.service" "$SCRIPT_DIR/worker/install/systemd/libretime-celery.service" +install_service "libretime-worker.service" "$SCRIPT_DIR/worker/install/systemd/libretime-worker.service" # Install Legacy ######################################################################################## diff --git a/installer/systemd/libretime.target b/installer/systemd/libretime.target index 0fa95219d..9efeceedf 100644 --- a/installer/systemd/libretime.target +++ b/installer/systemd/libretime.target @@ -2,9 +2,9 @@ Description=LibreTime Services Wants=libretime-analyzer.service Wants=libretime-api.service -Wants=libretime-celery.service Wants=libretime-liquidsoap.service Wants=libretime-playout.service +Wants=libretime-worker.service [Install] WantedBy=multi-user.target diff --git a/legacy/application/check.php b/legacy/application/check.php index 59dbe31ab..896171a03 100644 --- a/legacy/application/check.php +++ b/legacy/application/check.php @@ -150,13 +150,13 @@ function checkLiquidsoapService() } /** - * Check if libretime-celery is currently running. + * Check if libretime-worker is currently running. * - * @return bool true if libretime-celery is running + * @return bool true if libretime-worker is running */ function checkCeleryService() { - exec('systemctl is-active libretime-celery --quiet', $out, $status); + exec('systemctl is-active libretime-worker --quiet', $out, $status); return $status == 0; } diff --git a/legacy/application/configs/config-check.php b/legacy/application/configs/config-check.php index d82ed090e..2841064e2 100644 --- a/legacy/application/configs/config-check.php +++ b/legacy/application/configs/config-check.php @@ -243,10 +243,10 @@ $result = $r1 && $r2; "> - /etc/systemd/system/, + /etc/systemd/system/, -
systemctl status libretime-celery
-
sudo systemctl restart libretime-celery +
systemctl status libretime-worker
+
sudo systemctl restart libretime-worker diff --git a/legacy/application/views/scripts/systemstatus/index.phtml b/legacy/application/views/scripts/systemstatus/index.phtml index 02391b3db..e5ed76c09 100644 --- a/legacy/application/views/scripts/systemstatus/index.phtml +++ b/legacy/application/views/scripts/systemstatus/index.phtml @@ -169,10 +169,10 @@ $result = $r1 && $r2; "> - /etc/systemd/system/, + /etc/systemd/system/, -
systemctl status libretime-celery
-
sudo systemctl restart libretime-celery +
systemctl status libretime-worker
+
sudo systemctl restart libretime-worker diff --git a/worker/install/systemd/libretime-celery.service b/worker/install/systemd/libretime-worker.service similarity index 100% rename from worker/install/systemd/libretime-celery.service rename to worker/install/systemd/libretime-worker.service diff --git a/worker/setup.py b/worker/setup.py index 5ef29b47d..fdeb03e24 100644 --- a/worker/setup.py +++ b/worker/setup.py @@ -1,9 +1,9 @@ from setuptools import find_packages, setup setup( - name="libretime-celery", + name="libretime-worker", version="0.1", - description="LibreTime Celery", + description="LibreTime Worker", author="LibreTime Contributors", url="https://github.com/libretime/libretime", project_urls={