pyinotify backend: guarantees initial scanning of log-file by start (retarded via pending event if filter not yet active)

pull/2689/head
sebres 2020-03-13 22:07:32 +01:00
parent 68f827e1f3
commit bc2b81133c
2 changed files with 8 additions and 1 deletions

View File

@ -34,6 +34,7 @@ ver. 0.10.6-dev (20??/??/??) - development edition
### Fixes
* [stability] prevent race condition - no ban if filter (backend) is continuously busy if
too many messages will be found in log, e. g. initial scan of large log-file or journal (gh-2660)
* pyinotify-backend sporadically avoided initial scanning of log-file by start
* python 3.9 compatibility (and Travis CI support)
* restoring a large number (500+ depending on files ulimit) of current bans when using PyPy fixed
* manual ban is written to database, so can be restored by restart (gh-2647)

View File

@ -271,7 +271,13 @@ class FilterPyinotify(FileFilter):
def _addLogPath(self, path):
self._addFileWatcher(path)
# initial scan:
if self.active:
# we can execute it right now:
self._process_file(path)
else:
# retard until filter gets started:
self._addPending(path, ('INITIAL', path))
##
# Delete a log path