You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on windows, the Observer constructor is returning an instance of watchdog.observers.read_directory_changes.WindowsApiObserver that I think it is the correct behavior.
I'm expecting that the event queue is checked every 0.1 s for new events to be dispatched. Is this correct?
What I am observing is that if a parallel process is creating a bunch of new directories in the monitored directory, the corresponding events are processed with 1 second delay in between independently of the timeout value. If I set a timeout value greater than 1 s in the Observer constructor, I get anyhow 1 second delay in between.
If the parallel process instead of a bunch of directories creates a bunch of files, the Observer is reacting much faster, more or less at the speed I would expected having set 0.1 s timeout.
Looking at the source code for the WindowsApiObserver I have noticed a 'HACK' named WATCHDOG_TRAVERSE_MOVED_DIR_DELAY = 1. Has this something to do with what I am seeing? If so, it would be probably better to document this expected behavior somewhere.
Watchdog version 2.1.9
Python version 3.10.5
Windows Server
The text was updated successfully, but these errors were encountered:
Hi there!
I have implemented a mirroring handler that is replicating the content of a directory (recursive) to another (network) location on windows.
I have subclassed the PatternMatchingEventHandler and using the standard Observer.
When I create the observer I used something like:
my_observer = watchdog.observers.Observer(timeout=0.1)
Running on windows, the Observer constructor is returning an instance of watchdog.observers.read_directory_changes.WindowsApiObserver that I think it is the correct behavior.
I'm expecting that the event queue is checked every 0.1 s for new events to be dispatched. Is this correct?
What I am observing is that if a parallel process is creating a bunch of new directories in the monitored directory, the corresponding events are processed with 1 second delay in between independently of the timeout value. If I set a timeout value greater than 1 s in the Observer constructor, I get anyhow 1 second delay in between.
If the parallel process instead of a bunch of directories creates a bunch of files, the Observer is reacting much faster, more or less at the speed I would expected having set 0.1 s timeout.
Looking at the source code for the WindowsApiObserver I have noticed a 'HACK' named WATCHDOG_TRAVERSE_MOVED_DIR_DELAY = 1. Has this something to do with what I am seeing? If so, it would be probably better to document this expected behavior somewhere.
Watchdog version 2.1.9
Python version 3.10.5
Windows Server
The text was updated successfully, but these errors were encountered: