Closed safizn closed 5 years ago
Maybe can be useful - https://stackoverflow.com/questions/21587415/python-watchdog-modified-and-created-duplicate-events
Sorry I don't deal with python.
Hi Dr. Safi, Thanks for reporting this. Can you please provide some extra details:
@merofeev
Dear @myuseringithub and @fchastanet,
The version of 1.2.0 docker-windows-volume-watcher
has been released. I have added optional debounce support to it.
To try it:
docker-windows-volume-watcher
: pip install --upgrade docker-windows-volume-watcher
debounce
option: docker-volume-watcher --debounce 0.1
I kindly ask you to test it in your environment and report your results.
If your expireience with this feature is good, I will make it enabled by default in the next release.
Thanks for the effort, I've implemented my own debounce around the issue. Once I will have time to test it, I will write up.
Unfortunately I'm still getting I'm getting exactly 2 notifications for every single file change, even with a debounce of 3 seconds. Here's a screncap, you can tell I didn't do anything in between saves (first time was ctrl+s, the second was clicking the save icon, nothing else):
Can anyone else reproduce this bug? Here's what I did: In a folder called test
I setup docker-compose.yml
with the following yaml:
version: '3'
services:
alpine:
image: node:6.17-alpine
entrypoint: tail -f /dev/null
restart: always
volumes:
- .:/var/www/html
Run via docker-compose up -d
. Then login to the container via docker exec -it test_alpine_1 sh
and install nodemon
and start monitoring for changes to text files:
npm install -g nodemon
nodemon -e "*.txt" /tail -f /dev/null
Then be sure you also start docker-volume-watcher
. In my case with a --debounce
of 3
.
Hi, all notifications of changes are duplicated, for some reason the container receives double the modification number. A single file modified change, triggers 2 container notify calls.
Suggested workaround:
Could you add an option for a slight delay like 100 ms, to prevent
docker-volume-watcher
from triggering false notifications (when it comes to the same container) ? e.g.docker-volume-watcher --delay 100
Versions:
pip list