Use inotify-simple instead of inotifyx
There's little hope that it gets maintained because it contains a C extension whereas alternatives often use ctypes. In particular, it has no support for Python 3, and this is a blocker for us. At the beginning, [I though we were switching to pyinotify](0bb405fc): it is quite popular, and even used by fail2ban, but the code is ugly (big, crazy API, limited, and probably slow). I didn't really know inotify and it's disappointing to see that created files (CREATE+WRITE+CLOSE_WRITE) can't be distinguished from hard links (CREATE). Acting upon new inodes is a common scenario and in the first case, you want to wait CLOSE_WRITE or you would read a partially written file. What I mean is that inotify is often unreliable, unless you detect changes done by your own software (e.g. you can make sure that files aren't hard-linked) but then some other IPC is probably simpler. In any case, I open this MR because I haven't tested it. I only checked with pylint (hence the second commit). /cc @alain.takoudjou @gabriel @luke (from Git history) /reviewed-on nexedi/slapos!257
Showing
Please register or sign in to comment