# HG changeset patch # User drewp@bigasterisk.com # Date 2012-07-18 18:08:12 # Node ID 3fe281a3be70d88c0544d94076fd854a3e1380c6 # Parent 6d8f0c088a26d7d7464a126f1a667c80f3414ffc rdfdb: try different inotify event mask to not miss events Ignore-this: 2845e718db6e7d313af8f454a1e05a8 diff --git a/light9/rdfdb/graphfile.py b/light9/rdfdb/graphfile.py --- a/light9/rdfdb/graphfile.py +++ b/light9/rdfdb/graphfile.py @@ -1,5 +1,6 @@ import logging, traceback from twisted.python.filepath import FilePath +from twisted.internet.inotify import IN_CLOSE_WRITE, IN_MOVED_FROM from rdflib import Graph from light9.rdfdb.patch import Patch @@ -13,7 +14,9 @@ class GraphFile(object): self.path, self.uri = path, uri self.patch, self.getSubgraph = patch, getSubgraph - notifier.watch(FilePath(path), callbacks=[self.notify]) + notifier.watch(FilePath(path), + mask=IN_CLOSE_WRITE | IN_MOVED_FROM, + callbacks=[self.notify]) self.reread() def notify(self, notifier, filepath, mask):