()
| 187 | } |
| 188 | |
| 189 | func 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 | |
| 206 | func panicTelemetryHandler(panicName string) { |
| 207 | activity := wshrpc.ActivityUpdate{NumPanics: 1} |
no test coverage detected