这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@pskrbasu
Copy link
Contributor

No description provided.

@pskrbasu pskrbasu self-assigned this Jan 16, 2025
@pskrbasu pskrbasu linked an issue Jan 16, 2025 that may be closed by this pull request
cmd/connect.go Outdated
// cleanup the old db files if not in use
err := cleanupOldDbFiles()
if err != nil {
log.Printf("[INFO] Failed to cleanup old db files: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same logging exists inside the function

log.Printf("[INFO] Cleaning up old db files in %s\n", baseDir)
cutoffTime := time.Now().Add(-constants.DbFileMaxAge) // Files older than 1 day

err := filepath.Walk(baseDir, func(path string, info os.FileInfo, err error) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we walking so we get all workdspace dirs? In whiuch case put this in a comment - mention where the root dir is you are walking from, the expectyyed file layout and the target files

@kaidaguerre kaidaguerre merged commit 1c50c93 into develop Jan 16, 2025
4 of 5 checks passed
@kaidaguerre kaidaguerre deleted the 143-cleanup-old-unused-db-files-in-data-dir branch January 16, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup old unused db files in data dir

3 participants