Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
refactor: Remove unreachable dead code branches
rcourtmanb6ae5d5e246a
diff --git a/internal/errors/errors.go b/internal/errors/errors.goindex d336b050f1..60b56b8b5b 100644--- a/internal/errors/errors.go+++ b/internal/errors/errors.go@@ -116,14 +116,13 @@ func isRetryable(errorType ErrorType, err error) bool {return truecase ErrorTypeAuth, ErrorTypeValidation, ErrorTypeNotFound:return false- case ErrorTypeInternal, ErrorTypeAPI:+ default: // ErrorTypeInternal, ErrorTypeAPI// Check the underlying errorif err != nil {return !errors.Is(err, ErrInvalidInput) && !errors.Is(err, ErrForbidden)}return true}- return false}// Helper functionsdiff --git a/internal/monitoring/scheduler.go b/internal/monitoring/scheduler.goindex 129c0080b3..16d4b466e9 100644--- a/internal/monitoring/scheduler.go+++ b/internal/monitoring/scheduler.go@@ -305,15 +305,9 @@ func (a *adaptiveIntervalSelector) SelectInterval(req IntervalRequest) time.Durascore := clampFloat(req.StalenessScore, 0, 1)span := float64(max - min)+ // target is mathematically in [min, max] since score ∈ [0,1] and span >= 0target := time.Duration(float64(min) + span*(1-score))- if target < min {- target = min- }- if target > max {- target = max- }-if req.ErrorCount > 0 {penalty := 1 + a.errorPenalty*float64(req.ErrorCount)if penalty > 0 {