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
If I want to use watchdog as a Python library and I want to receive events other than the ones that watchmedo is interested, I have to jump through a bunch of hoops to get an InotifyObserver which will set or clear values in the event mask given to inotify_c.Inotify.
I want to be able to supply my own mask to InotifyObserver so that I can receive these other events without monkey-patching the watchdog implementation.
An example of an acceptable interface would be:
InotifyObserver(event_mask=my_integer_mask)
Another example that might provide better flexibility would be:
with event_mask being passed on to the inotify_c.Inotify instance it creates.
Note that the emitter_class parameter is a generalization of an idea already present in the code (generate_full_events - which is essentially just a parameter to control the behavior of the emitter and the observer doesn't otherwise need to know anything about it).
The text was updated successfully, but these errors were encountered:
+1
We encountered this need over at Redis.
Our options for a workaround are not amazing -
patching / reimplementing or overriding non trivial core classes such as the InotifyBuffer..
We even considered switching to the polling observer
If I want to use watchdog as a Python library and I want to receive events other than the ones that watchmedo is interested, I have to jump through a bunch of hoops to get an
InotifyObserver
which will set or clear values in the event mask given toinotify_c.Inotify
.I want to be able to supply my own mask to
InotifyObserver
so that I can receive these other events without monkey-patching the watchdog implementation.An example of an acceptable interface would be:
Another example that might provide better flexibility would be:
coupled with the necessary changes to
InotifyBuffer
so that it passes through an event mask argument, egwith
event_mask
being passed on to theinotify_c.Inotify
instance it creates.Note that the
emitter_class
parameter is a generalization of an idea already present in the code (generate_full_events
- which is essentially just a parameter to control the behavior of the emitter and the observer doesn't otherwise need to know anything about it).The text was updated successfully, but these errors were encountered: