Mercurial > code > home > repos > homeauto
changeset 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 | 9328df09f679 |
children | bf03f5185e8f |
files | lib/patchablegraph.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
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)