comparison lib/patchablegraph.py @ 1032:69aad813a94e

fix patchablegraph unbind event Ignore-this: 96f7d4dd71f902730196e7517319192f darcs-hash:90040491939bac62a967c4eb631a8bfd96d9fdba
author drewp <drewp@bigasterisk.com>
date Tue, 26 Jan 2016 03:36:01 -0800
parents 4d36cae32a4c
children 4ebb5cc30002
comparison
equal deleted inserted replaced
1031:9328df09f679 1032:69aad813a94e
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