diff --git a/etc/raspberrypios/wrolpi-api.service b/etc/raspberrypios/wrolpi-api.service index fe35fb61..4cae7c2f 100644 --- a/etc/raspberrypios/wrolpi-api.service +++ b/etc/raspberrypios/wrolpi-api.service @@ -11,6 +11,8 @@ Group=wrolpi User=wrolpi WorkingDirectory=/opt/wrolpi/ Restart=on-failure +# Higher than the App so the API can start. +Nice=4 [Install] WantedBy=default.target diff --git a/etc/raspberrypios/wrolpi-app.service b/etc/raspberrypios/wrolpi-app.service index d6306830..1483bb14 100644 --- a/etc/raspberrypios/wrolpi-app.service +++ b/etc/raspberrypios/wrolpi-app.service @@ -9,6 +9,8 @@ ExecStart=/usr/bin/npm run start Group=wrolpi User=wrolpi WorkingDirectory=/opt/wrolpi/app/ +# Below the API so that Sanic worker can start. +Nice=6 [Install] WantedBy=default.target diff --git a/etc/raspberrypios/wrolpi-help.service b/etc/raspberrypios/wrolpi-help.service index 5eed0add..53aae648 100644 --- a/etc/raspberrypios/wrolpi-help.service +++ b/etc/raspberrypios/wrolpi-help.service @@ -8,6 +8,8 @@ ExecStart=/bin/bash -c 'source /opt/wrolpi-help/venv/bin/activate && exec mkdocs Group=wrolpi User=wrolpi WorkingDirectory=/opt/wrolpi-help/ +# Below the App, but below the user. +Nice=1 [Install] WantedBy=default.target diff --git a/etc/raspberrypios/wrolpi-kiwix.service b/etc/raspberrypios/wrolpi-kiwix.service index b79970d2..8c69caaf 100644 --- a/etc/raspberrypios/wrolpi-kiwix.service +++ b/etc/raspberrypios/wrolpi-kiwix.service @@ -7,6 +7,8 @@ ExecStart=/opt/wrolpi/scripts/start_kiwix_serve.sh Group=wrolpi User=wrolpi WorkingDirectory=/opt/wrolpi/ +# Below the API, but above the Map. +Nice=8 [Install] WantedBy=default.target