cleanupDailyNotes removes old daily notes.
()
| 416 | |
| 417 | // cleanupDailyNotes removes old daily notes. |
| 418 | func (mw *memoryWorker) cleanupDailyNotes() { |
| 419 | if mw.cli.memoryStore == nil { |
| 420 | return |
| 421 | } |
| 422 | |
| 423 | mgr := mw.cli.memoryStore.Manager() |
| 424 | deleted, err := mgr.CleanupDailyNotes() |
| 425 | if err != nil { |
| 426 | mw.logger.Warn("Memory worker: daily cleanup failed", zap.Error(err)) |
| 427 | } else if deleted > 0 { |
| 428 | mw.logger.Info("Memory worker: cleaned up old daily notes", zap.Int("deleted", deleted)) |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | // detectFeature detects the current mode for usage stats. |
| 433 | func (mw *memoryWorker) detectFeature() string { |