Files
ntfy/cmd
binwiederhier bc1e879dc4 Persist batched messages on shutdown; graceful SIGTERM in serve
With cache-batch-size/-timeout set (ntfy.sh: 100 / 1500ms), accepted messages
wait in a BatchingQueue before they are written. Nothing drained that queue on
shutdown, and `ntfy serve` did not handle SIGTERM at all (only SIGHUP), so
every restart dropped up to one batch timeout's worth of accepted messages
from the cache: live subscribers got them, pollers and since= replays never
did.

- util.BatchingQueue.Close emits the pending elements and closes the output
  channel (Enqueue after Close is a no-op)
- message.Cache.Close closes the queue and waits for the batch writer before
  closing the database
- serve stops the server on SIGTERM/SIGINT and waits for Stop to finish (Run
  returns as soon as the listeners close); Stop is idempotent now, since the
  signal handler and serve both call it
2026-10-03 15:06:09 +00:00
..
2026-05-31 14:28:04 -04:00
2025-07-31 10:46:41 +02:00
2023-11-16 20:54:58 -05:00
2026-05-19 13:04:59 +02:00
2023-11-16 20:54:58 -05:00
2026-03-15 21:13:12 -04:00
2025-12-23 20:23:48 -05:00
2022-06-20 10:56:45 -04:00
2026-01-15 09:30:37 -05:00
2025-08-09 10:04:57 -04:00
2023-08-06 22:44:55 -06:00
2025-07-31 11:35:21 +02:00
2025-07-31 10:46:41 +02:00
2025-07-31 11:35:21 +02:00
2025-07-31 10:46:41 +02:00
2026-06-13 09:35:09 -04:00
2026-06-21 11:19:49 -04:00
2025-07-31 11:35:21 +02:00
2025-08-07 17:39:25 +02:00