comparison 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
comparison
equal deleted inserted replaced
226:1e8ef0daf0f8 227:c1b98006f56e
107 indent=None), 107 indent=None),
108 event='fullGraph') 108 event='fullGraph')
109 self.masterGraph.addObserver(self.onPatch) 109 self.masterGraph.addObserver(self.onPatch)
110 110
111 def onPatch(self, patchJson): 111 def onPatch(self, patchJson):
112 # throttle and combine patches here- ideally we could see how
113 # long the latency to the client is to make a better rate choice
112 self.sendEvent(message=patchJson, event='patch') 114 self.sendEvent(message=patchJson, event='patch')
113 115
114 def unbind(self): 116 def unbind(self):
115 self.settings.masterGraph.removeObserver(self.onPatch) 117 self.masterGraph.removeObserver(self.onPatch)
116 118