merofeev / docker-windows-volume-watcher

A tool to notify Docker contianers about changes in mounts on Windows.
MIT License
188 stars 30 forks source link

debounce multiple modified events that occur at a same moment #14

Closed fchastanet closed 5 years ago

fchastanet commented 5 years ago

Hello,

Thanks for your work I was having the same problem as described in https://github.com/merofeev/docker-windows-volume-watcher/issues/13

I have corrected it with this solution that is not perfect however see comment in it

kind regards

merofeev commented 5 years ago

Dear @fchastanet, Thank you for your contribution. With a heavy heart I have to decline it due to following reasons:

  1. If several files are changed during 2-second interval, all changes except the first one will be lost.
  2. 2-second debounce interval seems too large and it can't be configured by user.
  3. debounce function should be defined in the separate file.

Thank you for understanding.

The version of 1.2.0 docker-windows-volume-watcher has been released. I have added optional debounce support to it (it should not ignore events in different files). To try it:

  1. Update docker-windows-volume-watcher: pip install --upgrade docker-windows-volume-watcher
  2. And run it with debounce option: docker-volume-watcher --debounce 0.1

I kindly ask you to test it in your environment and join discussion of #13 by reporting your results.