fix(collect): only send Pushover on genuine failure, not partial - #1
Merged
Conversation
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.
Member
Author
|
🎉 This PR is included in version 3.7.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The collect cron sent a Pushover notification on every non-
okresult, includingpartial. In practice apartialcollect run just means a few repositories hit transient errors (or were skipped) while the rest were collected successfully — normal operation that shouldn't page the user.This pairs with think-root/content-alchemist#4: after that fix, quality-skipped repos no longer inflate the failure count, but partial runs (real transient per-repo errors) can still occur and shouldn't notify.
Fix
In
CollectJob, sendNotifyCronResultonly whenstatus == 0(all repositories failed, or the job panicked). Notifications now fire only on genuine failure.LogCronExecutionstill records every status (0/1/2), so the UI/history is unchanged.status = 0).messagecron is intentionally left as-is: therepartialmeans a post published to some platforms but failed on others, which is worth a notification.Scope
One file,
internal/schedule/collect-schedule.go. Builds clean (go build ./...).