Compare commits

...

1 Commits

Author SHA1 Message Date
MickLesk
faaf07cf86 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.
2026-09-12 14:20:49 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -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

View File

@@ -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