Automatically checkpoint modified noteboxes
(ctx context.Context)
| 298 | |
| 299 | // Automatically checkpoint modified noteboxes |
| 300 | func autoCheckpoint(ctx context.Context) { |
| 301 | for { |
| 302 | time.Sleep(time.Duration(AutoCheckpointSeconds) * time.Second) |
| 303 | err := checkpointAllNoteboxes(ctx, false) |
| 304 | if err != nil { |
| 305 | logError(ctx, "autoCheckpoint error: %s", err) |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | // Automatically purge noteboxes/notefiles with zero refcnt that haven't been recently used |
| 311 | func autoPurge(ctx context.Context) { |
no test coverage detected