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

fsnotify file watcher #41

Merged
merged 6 commits into from
Feb 24, 2025
Merged

fsnotify file watcher #41

merged 6 commits into from
Feb 24, 2025

Conversation

mkaczanowski
Copy link
Contributor

TL;DR

We noticed that sometimes the file watcher does not pick up the upgrade, while it is hard to point finger at the rootcause I've came up with the attempt to use the fsnotify to detect the file changes.

It may or may not be a better option, we'll see.

NOTE: This change is "in addition" to the previous (polling watcher) that is kept for backwards compatibility just in case the new one is as faulty as old one. Or my troubleshooting was wrong, and the issue is elsewhere.

To use the fsnotify watcher set the interval to 0 (see config)

@@ -0,0 +1,101 @@
package file_watcher
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is old file_watcher.go unmodified (except renaming to PollingFileWatcher)

@mkaczanowski mkaczanowski merged commit 38068b7 into main Feb 24, 2025
2 checks passed
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.

2 participants