Skip to content

v2.4.1: Refactor error handling, logging, and improve plugin configuration (#6)

Choose a tag to compare

@sethwv sethwv released this 26 Mar 17:58
d897b53

Added

  • Modified plugin metadata to support upcoming plugin repo.
  • Added stronger server stop reliability:
    • MetricsServer._verify_stopped() to confirm the port is actually free after stopping.
    • Stop-signal monitor now:
      • reuses a Redis client instead of reacquiring every loop iteration,
      • retries Redis acquisition if missing,
      • logs periodic “heartbeat” and escalates some logs to info/warning,
      • calls server.stop(timeout=5) and verifies shutdown.

Changed

  • Auto-start lock handling tightened and made safer:
    • lock file permissions changed from 0666 to 0600 (owner-only).
    • explicit handling of BlockingIOError to exit cleanly when another worker owns the lock.
    • improved cleanup on exceptions (best-effort unlock/close).
    • removed the early _auto_start_attempted = True assignment (was being set before lock/auto-start logic ran).
  • stop_server / restart_server actions improved for cross-worker scenarios:
    • more explicit logging when sending stop signals via Redis.
    • if shutdown isn’t confirmed within 5 seconds, force-cleans Redis keys (server_running, server_host, server_port, stop_requested) and removes the lock file so a restart can proceed.
  • General code cleanup:
    • Removed unused typing import.
    • Replaced many silent pass blocks with commented pass explaining why an exception is ignored.
    • Minor trimming of unused local variables in VOD programming (removed unused rating/air_date vars).