Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#272 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend, cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
Python
Estrellas
205
Forks
17
Merge medio
5 h 42 min
PR fusionados (30 d)
50

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de txoof/PaperPi

Todos los issues de txoof/PaperPi

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.