changeset 704:74ad667f8c5b

reformat Ignore-this: e1fe14c4b973c3c1fc2714b988ecc7c8
author drewp@bigasterisk.com
date Mon, 03 Feb 2020 00:51:18 -0800
parents 83ccc9ba90ea
children 394c57fcb0bb
files lib/patchablegraph/patchablegraph.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lib/patchablegraph/patchablegraph.py	Mon Feb 03 00:50:53 2020 -0800
+++ b/lib/patchablegraph/patchablegraph.py	Mon Feb 03 00:51:18 2020 -0800
@@ -71,7 +71,7 @@
     }})
 patchAsJson = jsonFromPatch # deprecated name
 
-    
+
 def patchFromJson(j):
     body = json.loads(j)['patch']
     a = ConjunctiveGraph()
@@ -128,7 +128,7 @@
         self._observers.append(onPatch)
         self._currentObservers = len(self._observers)
         self._observersAdded += 1
-        
+
     def removeObserver(self, onPatch):
         try:
             self._observers.remove(onPatch)
@@ -138,7 +138,7 @@
 
     def setToGraph(self, newGraph):
         self.patch(Patch.fromDiff(self._graph, newGraph))
-        
+
     _sendSimpleGraph = scales.PmfStat('serve/simpleGraph')
     _sendFullGraph = scales.PmfStat('serve/events/sendFull')
     _sendPatch = scales.PmfStat('serve/events/sendPatch')
@@ -146,7 +146,7 @@
 class CycloneGraphHandler(PrettyErrorHandler, cyclone.web.RequestHandler):
     def initialize(self, masterGraph):
         self.masterGraph = masterGraph
-        
+
     def get(self):
         with self.masterGraph._sendSimpleGraph.time():
             writeGraphResponse(self, self.masterGraph,
@@ -156,7 +156,7 @@
 class CycloneGraphEventsHandler(cyclone.sse.SSEHandler):
     """
     One session with one client.
-    
+
     returns current graph plus future patches to keep remote version
     in sync with ours.
 
@@ -180,7 +180,6 @@
             # 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=b'patch')
-               
+
     def unbind(self):
         self.masterGraph.removeObserver(self.onPatch)
-