Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: reload watch dir when add new folder #156

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

xjellyx
Copy link

@xjellyx xjellyx commented Sep 1, 2022

No description provided.

Copy link
Collaborator

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @olongfen , it addresses a shortcoming in the initial implementation of the file watch capability.

The big change needed here is to only trigger reload of the watcher on create or delete of a subdirectory, not any change that is other than an mbtiles file.

watch.go Outdated
@@ -37,6 +37,9 @@ func debounce(interval time.Duration, input chan string, firstCallback func(arg
callback(path)
delete(items, path)
}
case <-exit:
log.Info("debounce return")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This log statement can be removed

watch.go Show resolved Hide resolved
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.

None yet

2 participants