air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
17.63k stars 802 forks source link

Prevent double delays and add some docs #411

Closed svanharmelen closed 1 year ago

svanharmelen commented 1 year ago

I just noticed that reusing delay for the poll interval will cause an unintended double delay (first the delay is used as interval, and when a change happened delay is used to wait before building after the change).

Adding a dedicated poll_interval parameter allows people to prevent that and apply a more fine-grained configuration.

Also added the new params to the example toml file with some docs which I forgot to do in the initial PR and "fixed" a few linter warnings (if wanted I can of course remove that commit from the PR!).

Thanks again!

cosmtrek commented 1 year ago

Thanks for the contribution. I've reviewed the code and left some comments.

svanharmelen commented 1 year ago

Thanks! If possible, could you maybe set a new tag so we can use that instead of @latest?

svanharmelen commented 1 year ago

Just noticed the tag, thanks for being so responsive and helpful 👍🏻 Much appreciated!

silverwind commented 1 year ago

Sounds this may fix what I've seen in https://github.com/cosmtrek/air/pull/343#issuecomment-1305897741.