From 81fd028a52f2e69a3fa941232300983fb5314d2e Mon Sep 17 00:00:00 2001 From: Vasyl Vdovychenko Date: Fri, 22 May 2026 19:51:23 -0400 Subject: [PATCH] chore(pdf-quality): Makefile targets for quality-poller + StartLimit fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the seo-publish pattern (`make seo-publish-setup` / status / logs / restart / stop). Without these, deploying the Book Quality poller is a series of manual systemctl invocations. Also moves StartLimitBurst / StartLimitIntervalSec from [Service] to [Unit] where systemd expects them — previously emitted a "Unknown key" warning at startup. Cosmetic; the poller worked anyway. Co-Authored-By: Claude Opus 4.7 (1M context) --- Makefile | 27 ++++++++++++++++++++++++++- infra/systemd/quality-poller.service | 4 ++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f6efe83f..f234732d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: up down restart logs status backup restore backup-list backup-verify rebuild-ssg clean-ssg deploy nginx-setup build rebuild fix-permissions test lint reindex-search seo-publish-setup seo-publish-status seo-publish-logs seo-publish-restart seo-publish-stop +.PHONY: up down restart logs status backup restore backup-list backup-verify rebuild-ssg clean-ssg deploy nginx-setup build rebuild fix-permissions test lint reindex-search seo-publish-setup seo-publish-status seo-publish-logs seo-publish-restart seo-publish-stop quality-poll-setup quality-poll-status quality-poll-logs quality-poll-restart quality-poll-stop # ============================================================ # Docker Services @@ -175,6 +175,31 @@ seo-publish-restart: seo-publish-stop: @systemctl --user stop seo-publish-poller +# ============================================================ +# Book Quality Poller (Phase 1-2 structure fixes + Phase 3 content cleanup) +# ============================================================ + +quality-poll-setup: + @mkdir -p ~/.config/systemd/user + @cp infra/systemd/quality-poller.service ~/.config/systemd/user/ + @systemctl --user daemon-reload + @systemctl --user enable quality-poller + @systemctl --user start quality-poller + @loginctl enable-linger $$(whoami) + @echo "Book Quality poller installed and started." + +quality-poll-status: + @systemctl --user status quality-poller + +quality-poll-logs: + @journalctl --user -u quality-poller -f + +quality-poll-restart: + @systemctl --user restart quality-poller + +quality-poll-stop: + @systemctl --user stop quality-poller + # ============================================================ # SEO Backfill (template-driven SEO generation for Authors/Editions/Genres/Blog) # ============================================================ diff --git a/infra/systemd/quality-poller.service b/infra/systemd/quality-poller.service index f34366d4..07c105fa 100644 --- a/infra/systemd/quality-poller.service +++ b/infra/systemd/quality-poller.service @@ -1,6 +1,8 @@ [Unit] Description=TextStack Book Quality Poller After=docker.service +StartLimitBurst=5 +StartLimitIntervalSec=300 [Service] Type=simple @@ -8,8 +10,6 @@ WorkingDirectory=/home/vasyl/projects/onlinelib/textstack ExecStart=/home/vasyl/projects/onlinelib/textstack/infra/scripts/quality-poll.sh Restart=on-failure RestartSec=10 -StartLimitBurst=5 -StartLimitIntervalSec=300 Environment=HOME=/home/vasyl Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus