MCPcopy
hub / github.com/wavetermdev/waveterm / backupCleanupLoop

Function backupCleanupLoop

cmd/server/main-server.go:189–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187}
188
189func backupCleanupLoop() {
190 defer func() {
191 panichandler.PanicHandler("backupCleanupLoop", recover())
192 }()
193 var nextCleanup int64
194 for {
195 if time.Now().Unix() > nextCleanup {
196 nextCleanup = time.Now().Add(BackupCleanupInterval).Unix()
197 err := filebackup.CleanupOldBackups()
198 if err != nil {
199 log.Printf("error cleaning up old backups: %v\n", err)
200 }
201 }
202 time.Sleep(BackupCleanupTick)
203 }
204}
205
206func panicTelemetryHandler(panicName string) {
207 activity := wshrpc.ActivityUpdate{NumPanics: 1}

Callers 1

mainFunction · 0.85

Calls 2

PanicHandlerFunction · 0.92
CleanupOldBackupsFunction · 0.92

Tested by

no test coverage detected