Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Command line: paperpi reload applies config changes and reports the result

Aperta
#272 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, cli

Direzione di ricerca

Read src/paperpi/cli.py, health.py, and docs/decisions/live-config-reload.md to understand the existing signal and health report behavior. The issue leaves process discovery and result reporting undecided, so begin by tracing how paperpi run handles SIGHUP and how reload results are recorded. Done means paperpi reload reports applied, invalid config, or not running, with the specified exit status.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:core enhancement

From the M5 part 4 design (web interface #238, Review changes page), agreed with txoof on 2026-10-11: a simple command to apply hand edits to the config file, so the web page (and the docs) can show one easy command.

Background: "reload" in PaperPi already means read the config file again and apply only what changed, without a restart (docs/decisions/live-config-reload.md). Unchanged plugins keep their data and their place in the order. Saving in the web interface uses exactly this. Today the only command-line ways to start it are kill -HUP <process id> or sudo systemctl reload paperpi (once PaperPi runs as a service). The design note already names a paperpi reload command, but it was never built.

Proposal

paperpi reload
  1. Finds the running paperpi run by itself (no process id to look up).
  2. Sends it the reload signal (SIGHUP).
  3. Waits a few seconds for the result and prints it:
    • applied (and, if possible, a short list of what changed, the same list as the web interface's Review changes page)
    • the config file has a mistake: line 42: ...; nothing changed, the old settings keep running
    • PaperPi is not running
  4. Exit status 0 when applied, 1 otherwise (so scripts and systemd can tell).

Works the same in the Docker container (docker exec paperpi paperpi reload, M6). The systemd service file can use it as its reload step (ExecReload=), so systemctl reload paperpi also reports a broken file.

To decide

  • How it finds the running PaperPi: the process id in the health report file (/run/paperpi/health, already written every 30 s), or a separate process id file.
  • How the result gets back to the command: e.g. the running PaperPi writes "last reload: time, result" into the health report, and paperpi reload waits until it changes (time limit about 15 s).
  • Whether it also gets a "check only" mode that names mistakes without applying anything.

Not part of the M5 part 4 PR. Until it exists, the Review changes page shows sudo systemctl reload paperpi or kill -HUP <process id>.

Area

core (src/paperpi/cli.py, health.py), docs (README, live-config-reload.md).

Lingua principale
Python
Stelle
205
Fork
17
Merge medio
6h 12m
PR unite (30g)
44

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di txoof/PaperPi

Tutte le issue di txoof/PaperPi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.