Skip to content

armgit / Pulse

Public Imported from GitHub
0

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.

Allow PBS backup poll to finish after poller returns

rcourtmana9e751d16540
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go
index dc641ac15e..477b5ca7d6 100644
--- a/internal/monitoring/monitor.go
+++ b/internal/monitoring/monitor.go
@@ -7886,8 +7886,10 @@ func (m *Monitor) pollPBSInstance(ctx context.Context, instanceName string, clie
Int("datastores", len(ds)).
Msg("Starting background PBS backup polling")
- // Use parent context for proper cancellation chain
- backupCtx, cancel := context.WithTimeout(ctx, 5*time.Minute)
+ // Detached background poll: parent ctx may be cancelled when the main
+ // poll cycle finishes, so use a fresh context to let PBS polling
+ // complete unless the explicit timeout is reached.
+ backupCtx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
m.pollPBSBackups(backupCtx, inst, pbsClient, ds)