From 12fa005f0ff7e6adb9a45b896bbea1b922369885 Mon Sep 17 00:00:00 2001 From: sigmanor Date: Tue, 28 Jul 2026 18:12:50 +0300 Subject: [PATCH] fix(collect): only send Pushover on genuine failure, not partial The collect job fired a Pushover notification on every non-ok result, including "partial" runs. After the content-alchemist fix, a partial collect just means a few repos hit transient errors while the rest were collected successfully - that is normal operation and shouldn't page. Send the collect notification only when status == 0 (all repos failed or the job panicked). LogCronExecution still records every status, so the UI/history is unchanged. The message cron keeps notifying on partial, where it means a post published to some platforms but failed on others. --- internal/schedule/collect-schedule.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/schedule/collect-schedule.go b/internal/schedule/collect-schedule.go index 728d06a..f8dcf91 100644 --- a/internal/schedule/collect-schedule.go +++ b/internal/schedule/collect-schedule.go @@ -115,7 +115,13 @@ func CollectJob(s *gocron.Scheduler, store store.StoreInterface) { if err := store.LogCronExecution("collect", status, logMessage); err != nil { log.Error("Failed to log cron execution: %v", err) } - notification.NotifyCronResult("collect", status, logMessage) + // Only alert via Pushover when the collect job genuinely failed + // (status 0). A "partial" result just means some repos were skipped or + // hit transient errors while others were collected successfully - that + // is normal operation and shouldn't generate a notification. + if status == 0 { + notification.NotifyCronResult("collect", status, logMessage) + } }()