feat: add notifier scheduler and NotifyOnce sent-tracking

This commit is contained in:
2026-07-19 22:32:57 +03:00
parent 3af33bd728
commit 11f838ace9
6 changed files with 401 additions and 4 deletions

View File

@@ -113,10 +113,10 @@ name collisions.)
- [x] run tests - must pass before task 6
### Task 6: Notifier — scheduler + sent-tracking
- [ ] add `NotifyOnce(ctx, db, sender, cfg)` : query `GetUnnotifiedReleases`, build digest, send, `MarkNotificationSent` per rgid
- [ ] add cron-based scheduler goroutine honoring `TelegramConfig.CronSchedule` (use a lightweight cron lib or robfig/cron); no-op if `Enabled=false`
- [ ] write tests: `NotifyOnce` marks sent and skips already-sent; scheduler parses cron and fires (inject fixed time / use every-minute for test)
- [ ] run tests - must pass before task 7
- [x] add `NotifyOnce(ctx, db, sender, cfg)` : query `GetUnnotifiedReleases`, build digest, send, `MarkNotificationSent` per rgid
- [x] add cron-based scheduler goroutine honoring `TelegramConfig.CronSchedule` (use a lightweight cron lib or robfig/cron); no-op if `Enabled=false`
- [x] write tests: `NotifyOnce` marks sent and skips already-sent; scheduler parses cron and fires (inject fixed time / use every-minute for test)
- [x] run tests - must pass before task 7
### Task 7: Web UI — server + auth + dashboard
- [ ] create `internal/web` with `Server` (net/http), `//go:embed` templates, basic-auth middleware using `ServerConfig.Username/Password`