EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 9e5036cd authored by Lubomir Dolezal's avatar Lubomir Dolezal
Browse files

try changing ingestor filedaemon to `process_IN_CLOSE_WRITE`

parent 46172b3d
No related branches found
No related tags found
1 merge request!49Production release 1.1.1
......@@ -81,7 +81,7 @@ client = redis.Redis(
watchmanager = pyinotify.WatchManager()
class EventHandler(pyinotify.ProcessEvent):
def process_IN_CREATE(self, event):
def process_IN_CLOSE_WRITE(self, event):
logger.info(f'Parsing browse file: {event.pathname}')
try:
with open(event.pathname) as f:
......@@ -100,6 +100,6 @@ class EventHandler(pyinotify.ProcessEvent):
handler = EventHandler()
notifier = pyinotify.Notifier(watchmanager, handler)
wdd = watchmanager.add_watch(watch_dir, pyinotify.IN_CREATE, rec=True)
wdd = watchmanager.add_watch(watch_dir, pyinotify.IN_CLOSE_WRITE, rec=True)
notifier.loop()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment