diff lib/patchablegraph.py @ 227:c1b98006f56e

fix patchablegraph unbind event Ignore-this: 96f7d4dd71f902730196e7517319192f
author drewp@bigasterisk.com
date Tue, 26 Jan 2016 03:36:01 -0800
parents 596c645a1fc5
children 4ebb5cc30002
line wrap: on
line diff
--- a/lib/patchablegraph.py	Tue Jan 26 03:34:05 2016 -0800
+++ b/lib/patchablegraph.py	Tue Jan 26 03:36:01 2016 -0800
@@ -109,8 +109,10 @@
         self.masterGraph.addObserver(self.onPatch)
 
     def onPatch(self, patchJson):
+        # throttle and combine patches here- ideally we could see how
+        # long the latency to the client is to make a better rate choice
         self.sendEvent(message=patchJson, event='patch')
                
     def unbind(self):
-        self.settings.masterGraph.removeObserver(self.onPatch)
+        self.masterGraph.removeObserver(self.onPatch)