mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-12 16:56:37 +00:00
Add --no-sync to Paperless uv run services
Updates Paperless NGX service handling so `uv run` commands consistently include `--no-sync`. The update script now patches all Paperless systemd units (`consumer`, `scheduler`, `task-queue`, and `webserver`) and adjusts the webserver `ExecStartPre` reindex command accordingly, then reloads systemd once after these edits. The install template comment was updated to match the new `ExecStartPre` form.
This commit is contained in:
@@ -169,9 +169,13 @@ function update_script() {
|
||||
if ((BRIDGE_UPDATE == 0)); then
|
||||
sed -i 's|^ExecStart=.*|ExecStart=uv run --no-sync -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"|' /etc/systemd/system/paperless-webserver.service
|
||||
grep -q "document_index reindex" /etc/systemd/system/paperless-webserver.service ||
|
||||
sed -i '/^ExecStart=/i ExecStartPre=uv run -- python manage.py document_index reindex --if-needed --no-progress-bar' /etc/systemd/system/paperless-webserver.service
|
||||
$STD systemctl daemon-reload
|
||||
sed -i '/^ExecStart=/i ExecStartPre=uv run --no-sync -- python manage.py document_index reindex --if-needed --no-progress-bar' /etc/systemd/system/paperless-webserver.service
|
||||
fi
|
||||
for svc in consumer scheduler task-queue webserver; do
|
||||
unit="/etc/systemd/system/paperless-${svc}.service"
|
||||
[[ -f "$unit" ]] && sed -i 's|uv run -- |uv run --no-sync -- |g' "$unit"
|
||||
done
|
||||
$STD systemctl daemon-reload
|
||||
cd /opt/paperless
|
||||
$STD uv sync --all-extras
|
||||
cd /opt/paperless/src
|
||||
|
||||
@@ -151,7 +151,7 @@ Requires=redis.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/paperless/src
|
||||
#ExecStartPre=uv run -- python manage.py document_index reindex --if-needed --no-progress-bar
|
||||
#ExecStartPre=uv run --no-sync -- python manage.py document_index reindex --if-needed --no-progress-bar
|
||||
ExecStart=uv run --no-sync -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
||||
Environment=GRANIAN_HOST=::
|
||||
Environment=GRANIAN_PORT=8000
|
||||
|
||||
Reference in New Issue
Block a user