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

Getting more default values from environment variables #302

Open
cmarqu opened this issue Sep 3, 2024 · 1 comment
Open

Getting more default values from environment variables #302

cmarqu opened this issue Sep 3, 2024 · 1 comment

Comments

@cmarqu
Copy link

cmarqu commented Sep 3, 2024

I have a need to tweak the settings of debounce and step. I am not using watchfiles directly however but via sphinx-autobuild, which does not currently expose those arguments to the user (see sphinx-doc/sphinx-autobuild#174).

I am wondering if it would be a good idea to be able to define the default values of such settings via environment variables so that not all of the tools using watchfiles need to support setting such rarely changed values?
One could claim that there even is precedent for this in the form of the existing WATCHFILES_DEBUG.

@joelpelaez
Copy link
Contributor

I think this is important, in Windows platform when running Docker containers for development, WSL doesn't have support for inotify, and many watchers use stat for file monitoring.

Watchfiles has an stat mechanism, but the option for increase poll time between iterations only can be modified on watch() parameters and libraries than use this library don't pass that argument.

Add an environment variables for settings like that can help to optimize or reduce load.

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

2 participants