feat: migrate Ntfy message retrieval from polling to SSE streaming, replacing poll_interval with reconnect_delay for continuous updates. #20

Merged
genewildish merged 2 commits from feat/ntfy-sse into main 2026-03-15 20:50:09 +00:00
Owner

Switch ntfy message retrieval from polling to SSE streaming

Previously NtfyPoller polled ntfy.sh every 15 seconds using ?poll=1. Messages could arrive up to 15s late.

Changes
• Removed ?poll=1 from the topic URL so ntfy.sh keeps the connection open as a live SSE stream; messages now arrive within network RTT (~1s)
• Replaced poll_interval with reconnect_delay (5s) — only used when the server closes the connection
• Increased socket timeout from 10s → 90s to survive ntfy.sh keepalive heartbeats without spurious reconnects
• Added _build_url(last_id) — tracks the ntfy message ID of the last received event and passes ?since= on reconnect, preventing duplicate message display after a dropped connection
• Cleaned up config.py; since= is now managed internally by the class

Switch ntfy message retrieval from polling to SSE streaming Previously NtfyPoller polled ntfy.sh every 15 seconds using ?poll=1. Messages could arrive up to 15s late. Changes • Removed ?poll=1 from the topic URL so ntfy.sh keeps the connection open as a live SSE stream; messages now arrive within network RTT (~1s) • Replaced poll_interval with reconnect_delay (5s) — only used when the server closes the connection • Increased socket timeout from 10s → 90s to survive ntfy.sh keepalive heartbeats without spurious reconnects • Added _build_url(last_id) — tracks the ntfy message ID of the last received event and passes ?since=<id> on reconnect, preventing duplicate message display after a dropped connection • Cleaned up config.py; since= is now managed internally by the class
genewildish added 1 commit 2026-03-15 20:49:59 +00:00
genewildish added 1 commit 2026-03-15 20:50:03 +00:00
genewildish merged commit d758541156 into main 2026-03-15 20:50:09 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: genewildish/Mainline#20