changeset 859:9f771db2b0b6

don't react to inotify events that are just us reading the file Ignore-this: 5bbb75a72e2db038b1891c5aa7cce8b0
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 06 Jun 2013 03:19:40 +0000
parents 1f93e5d19f8a
children 8189f27679a1
files light9/rdfdb/graphfile.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/light9/rdfdb/graphfile.py	Thu Jun 06 03:14:06 2013 +0000
+++ b/light9/rdfdb/graphfile.py	Thu Jun 06 03:19:40 2013 +0000
@@ -50,10 +50,9 @@
                        callbacks=[self.notify])
       
     def notify(self, notifier, filepath, mask):
-        # this is from some other version, and I forget the point. Delete
-#        mask = humanReadableMask(mask)
-#        if mask[0] in ['open', 'access', 'close_nowrite', 'attrib', 'delete_self']:
-#            return
+        maskNames = humanReadableMask(mask)
+        if maskNames[0] in ['open', 'access', 'close_nowrite', 'attrib', 'delete_self']:
+            return
 
         try:
             if filepath.getModificationTime() == self.lastWriteTimestamp:
@@ -63,7 +62,7 @@
             log.error("watched file %s: %r" % (filepath, e))
             return
             
-        log.info("file %s changed", filepath)
+        log.info("file %s changed (%s)", filepath, maskNames)
         try:
             self.reread()
         except Exception: