diff --git a/config.json b/config.json index c0d1197..23d8a10 100644 --- a/config.json +++ b/config.json @@ -166,20 +166,20 @@ } }, "checkpoints": { - "interval": "12h", + "interval": "1h", "directory": "./var/checkpoints", - "restore": "48h" + "restore": "1h" }, "archive": { - "interval": "168h", + "interval": "2h", "directory": "./var/archive" }, "http-api": { - "address": "localhost:8081", + "address": "localhost:8082", "https-cert-file": null, "https-key-file": null }, - "retention-in-memory": "48h", + "retention-in-memory": "1h", "nats": null, "jwt-public-key": "kzfYrYy+TzpanWZHJ5qSdMj5uKUWgq74BWhQG6copP0=" } \ No newline at end of file diff --git a/internal/memorystore/checkpoint.go b/internal/memorystore/checkpoint.go index 9b036d5..93585b6 100644 --- a/internal/memorystore/checkpoint.go +++ b/internal/memorystore/checkpoint.go @@ -478,8 +478,10 @@ func findFiles(direntries []fs.DirEntry, t int64, findMoreRecentFiles bool) ([]s e := direntries[i] ts1 := nums[e.Name()] - if findMoreRecentFiles && t <= ts1 || i == len(direntries)-1 { + if findMoreRecentFiles && t <= ts1 { filenames = append(filenames, e.Name()) + } + if i == len(direntries)-1 { continue }