Changeset - 3fe281a3be70
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 12 years ago 2012-07-18 18:08:12
drewp@bigasterisk.com
rdfdb: try different inotify event mask to not miss events
Ignore-this: 2845e718db6e7d313af8f454a1e05a8
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/rdfdb/graphfile.py
Show inline comments
 
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):
0 comments (0 inline, 0 general)