MCPcopy Create free account
hub / github.com/blues/note / autoCheckpoint

Function autoCheckpoint

lib/notebox.go:300–308  ·  view source on GitHub ↗

Automatically checkpoint modified noteboxes

(ctx context.Context)

Source from the content-addressed store, hash-verified

298
299// Automatically checkpoint modified noteboxes
300func 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
311func autoPurge(ctx context.Context) {

Callers 1

OpenNoteboxFunction · 0.85

Calls 2

checkpointAllNoteboxesFunction · 0.85
logErrorFunction · 0.85

Tested by

no test coverage detected