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

stabilize config loading #88

Open
dswij opened this issue Jan 25, 2022 · 2 comments
Open

stabilize config loading #88

dswij opened this issue Jan 25, 2022 · 2 comments

Comments

@dswij
Copy link
Contributor

dswij commented Jan 25, 2022

related to #3

Currently, dura will read config from config file directly each time it needs to. Only loading config file when dura starts/reloaded is a nicer experience when a user is trying to change the config file (and suits well if dura planned to be a daemon)

@JakeStanger
Copy link
Collaborator

JakeStanger commented Jan 25, 2022

I might be missing something stupid/obvious but I'm unsure about this myself. It would be best practice to only load the config on startup and then keep it in memory, but this adds a lot of complexity.

Changes from dura watch or dura unwatch would need to be communicated to the daemon somehow, or you now need to systemctl restart dura (or whatever you're using) every time you watch/unwatch any dir or change how a dir is watched.

The only "downside" with the current implementation in my own eyes is the fact it's making unnecessary disk reads, but they're tiny. We've effectively got hot config reloading regardless of how dura runs with a very simple implementation, and that's pretty darn cool.

@tkellogg
Copy link
Owner

@dswij what is wrong with the user experience as it currently is?

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

No branches or pull requests

3 participants