Fix to findFiles

This commit is contained in:
Aditya Ujeniya 2024-09-27 17:15:06 +02:00
parent e8a5b2dce7
commit f9936ad705
2 changed files with 8 additions and 6 deletions

View File

@ -166,20 +166,20 @@
} }
}, },
"checkpoints": { "checkpoints": {
"interval": "12h", "interval": "1h",
"directory": "./var/checkpoints", "directory": "./var/checkpoints",
"restore": "48h" "restore": "1h"
}, },
"archive": { "archive": {
"interval": "168h", "interval": "2h",
"directory": "./var/archive" "directory": "./var/archive"
}, },
"http-api": { "http-api": {
"address": "localhost:8081", "address": "localhost:8082",
"https-cert-file": null, "https-cert-file": null,
"https-key-file": null "https-key-file": null
}, },
"retention-in-memory": "48h", "retention-in-memory": "1h",
"nats": null, "nats": null,
"jwt-public-key": "kzfYrYy+TzpanWZHJ5qSdMj5uKUWgq74BWhQG6copP0=" "jwt-public-key": "kzfYrYy+TzpanWZHJ5qSdMj5uKUWgq74BWhQG6copP0="
} }

View File

@ -478,8 +478,10 @@ func findFiles(direntries []fs.DirEntry, t int64, findMoreRecentFiles bool) ([]s
e := direntries[i] e := direntries[i]
ts1 := nums[e.Name()] ts1 := nums[e.Name()]
if findMoreRecentFiles && t <= ts1 || i == len(direntries)-1 { if findMoreRecentFiles && t <= ts1 {
filenames = append(filenames, e.Name()) filenames = append(filenames, e.Name())
}
if i == len(direntries)-1 {
continue continue
} }