R-585 (part): three producers follow the household's language
db_dump_failed, the off-box backup_failed and offbox_enlarge_blocked (whose sentence IS the household's mail - no hub customerMessages entry) now take facts and push a bundle key, so an English household reads English. Hungarian bytes unchanged (go-parity). Added to convertedProducers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -62,6 +62,10 @@ func convertedProducers() []struct {
|
||||
n.NotifyHealthChange("ok", nil, nil)
|
||||
}},
|
||||
{"db_dump_completed", func(n *Notifier) { n.NotifyDBDumpCompleted(DBDumpDetails{}) }},
|
||||
// R-585: three of the six producers that sent Hungarian only.
|
||||
{"db_dump_failed", func(n *Notifier) { n.NotifyDBDumpFailed("pg_dump: exit 1") }},
|
||||
{"backup_failed_offbox", func(n *Notifier) { n.NotifyOffboxBackupFailed("a NAS nem elerheto") }},
|
||||
{"offbox_enlarge_blocked", func(n *Notifier) { n.NotifyOffboxEnlargeBlocked("immich", "120 GB", 80, 100) }},
|
||||
{"controller_updated", func(n *Notifier) { n.NotifyControllerUpdated("0.255.0", "0.256.0", true) }},
|
||||
{"controller_update_failed", func(n *Notifier) { n.NotifyControllerUpdated("0.255.0", "0.256.0", false) }},
|
||||
{"controller_started", func(n *Notifier) { n.NotifyControllerStarted("0.256.0", nil) }},
|
||||
|
||||
@@ -483,8 +483,17 @@ func (n *Notifier) NotifyBackupRunFailures(message string, d BackupRunFailuresDe
|
||||
// body). NOTE: the event type "offbox_enlarge_blocked" must be added to the hub's allowedEventTypes +
|
||||
// customerMessages for delivery (a hub-side task, flagged — until then the hub 400s/drops it and the
|
||||
// in-dashboard LastWarning + /backups/remote note carry the message).
|
||||
func (n *Notifier) NotifyOffboxEnlargeBlocked(message string) {
|
||||
n.PushEvent("offbox_enlarge_blocked", "warning", message, nil)
|
||||
//
|
||||
// R-585: it takes the FACTS, not a finished sentence, so the sentence follows the household's language —
|
||||
// this type has no customerMessages entry on the hub, so its sentence IS the household's mail.
|
||||
func (n *Notifier) NotifyOffboxEnlargeBlocked(stack, estimate string, usedGB, quotaGB int) {
|
||||
n.pushEventMsg("offbox_enlarge_blocked", "warning", "event.offbox_enlarge_blocked", nil, stack, estimate, usedGB, quotaGB)
|
||||
}
|
||||
|
||||
// NotifyOffboxBackupFailed is the off-box (NAS / off-site) run's failure — a `backup_failed` event whose
|
||||
// headline follows the household's language (R-585). detail is the sanitised cause (OffsiteFailureMessage).
|
||||
func (n *Notifier) NotifyOffboxBackupFailed(detail string) {
|
||||
n.pushEventMsg("backup_failed", "error", "event.offbox_backup_failed", BackupDetails{Error: detail})
|
||||
}
|
||||
|
||||
// (NotifyBackupCompleted removed 2026-06-16 — the backup_completed event had no callers
|
||||
@@ -493,8 +502,9 @@ func (n *Notifier) NotifyOffboxEnlargeBlocked(message string) {
|
||||
// below are still emitted and consumed.)
|
||||
|
||||
// NotifyDBDumpFailed sends a DB dump failure event.
|
||||
func (n *Notifier) NotifyDBDumpFailed(message, errMsg string) {
|
||||
n.PushEvent("db_dump_failed", "error", message, DBDumpDetails{Error: errMsg})
|
||||
// R-585: the headline is a bundle key, so it follows the household's language; errMsg is the cause.
|
||||
func (n *Notifier) NotifyDBDumpFailed(errMsg string) {
|
||||
n.pushEventMsg("db_dump_failed", "error", "event.db_dump_failed", DBDumpDetails{Error: errMsg})
|
||||
}
|
||||
|
||||
// NotifyDBDumpCompleted sends a DB dump success event.
|
||||
|
||||
Reference in New Issue
Block a user