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
Hi,
I've tried watch IN_CLOSE_WRITE event for my new files .
It works pretty good when I watch IN_CLOSE_WRITE only, when I watch IN_CREATE and IN_CLOSE_WRITE , it will lose lot's of IN_CLOSE_WRITE event .
It dosen't work when I import pyinotify either. I bugs me a lot.Hope you give me some advice.
The text was updated successfully, but these errors were encountered:
Ok, what happens is you experience both this issue #2 and the effects of its mitigation.
Concretely when you copy and attempt to automatically watch a directory 01/ with multiples sub-directories there is a kind of concurrency issue between the moment files are copied and the moment when watches are added, that means for instance that if 01/01/* files are copied and then the 01/02/ directory is created, by the time Pyinotify has processed the events related to 01/01 there are some chances that 01/02 will already be created and its files copied. Because there is nothing we can really do to completely fix this issue, it was decided in #2 that the least bad behavior was to generate IN_CREATE for simulating creation of files contained in 01/02 because we know that this directory is new therefore its files are new, this is why you observe IN_CREATE events. However, others events are not simulated because we can't be sure that a file was either closed after a write or without a write for instance.
So in short, there is nothing we can't really do in this case and you can only rely on IN_CREATE events. Also if you really want to avoid this issue when you copy a directory, then you have to make sure it doesn't contain other directories.
Hi,
I've tried watch IN_CLOSE_WRITE event for my new files .
It works pretty good when I watch IN_CLOSE_WRITE only, when I watch IN_CREATE and IN_CLOSE_WRITE , it will lose lot's of IN_CLOSE_WRITE event .
It dosen't work when I import pyinotify either. I bugs me a lot.Hope you give me some advice.
The text was updated successfully, but these errors were encountered: