aionotify
aionotify copied to clipboard
Allow watching a file that didn't exist before
If a watch request fails because the file didn't exist, an OSError
is
correctly raised, but the alias remains in the list of requests.
Therefore it isn't possible to catch the exception, and retry the watch
request once the file has been created.
This patch adds the watch request to the request queue after attempting
to call _setup_watch
, to ensure it doesn't get left in the queue if
the setup fails.
I think the same should be done in the unwatch()
method.
If a watched file is removed, it's not possible to unwatch it because the kernel will raise an OSError
. In that case, the request is left around and you can't watch()
the file again later.
What I described seems to be a similar issue to the one mentioned in https://github.com/rbarrois/aionotify/issues/2
@rbarrois hi, any chance this could be merged?
Any updates?
Is this project dead? no action for years.
I copy original module and apply all PR changes for my copy. All works fine, but this really sad when i see no progress all this time