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
Watch the config folder for file changes #26
Comments
Current caveats: * Config watcher does not adapt to new files in conf.d (it should in the future adapt to new files) * Config watcher does not adapt to removed files
I've got a preliminary version of this up and running. Was a bit interesting to figure out, but if you're into the deets here's how it works so far:
So far, it works great, but the watchers don't dynamically update based on new files. So if you add a new .ini file, the watcher will trigger once, but subsequent changes to that .ini file aren't tracked. Also, if you install an extension this watcher event may trigger like 20 times in < 1 second, so that needs to be debounced as well. Otherwise, it attempts to load PHP info that many times as well, blocking the main thread. More on that next time I work on this. |
Planned for 4.2 or later, since this is a big change. Not sure I'll have time to polish this by the end of the year. It's gonna depend :) |
Currently, there's a manual refresh option in v3.3 (added via #24) but in the future I'd like to watch the config folder for file changes, so that when a file in the config folder changes, PHP Monitor automatically reloads the PHP installation information.
Important note: The folder watcher should stop watching when the PHP version changes, and start watching again. It should do this without leaking memory, so I should be careful about retain cycles here.
The text was updated successfully, but these errors were encountered: