changeset 34:6d15c808db3e

unbreak clients- the (re)start event is 'fullGraph' not 'graph'
author drewp@bigasterisk.com
date Sun, 24 Jul 2022 01:56:03 -0700
parents 4ba33b77fc32
children 6963f76124b7
files patchablegraph/handler.py patchablegraph/patchablegraph.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/patchablegraph/handler.py	Sun Jul 24 01:55:33 2022 -0700
+++ b/patchablegraph/handler.py	Sun Jul 24 01:56:03 2022 -0700
@@ -115,7 +115,7 @@
             etype, data = await events.get()
             # Are there more to get? We might throttle and combine patches here- ideally we could see how
             # long the latency to the client is to make a better rate choice
-            metric = {'graph': SEND_FULL_GRAPH, 'patch': SEND_PATCH}[etype]
+            metric = {'fullGraph': SEND_FULL_GRAPH, 'patch': SEND_PATCH}[etype]
             with metric.time():
                 yield ServerSentEvent(event=etype, data=data)
 
--- a/patchablegraph/patchablegraph.py	Sun Jul 24 01:55:33 2022 -0700
+++ b/patchablegraph/patchablegraph.py	Sun Jul 24 01:56:03 2022 -0700
@@ -135,7 +135,7 @@
         self._subscriptions.add(q)  # when caller forgets about queue, we will too
         OBSERVERS_CURRENT.labels(graph=self.label).set(len(self._subscriptions))
         OBSERVERS_ADDED.labels(graph=self.label).inc()
-        q.put_nowait(('graph', self.asJsonLd()))  # this should be chunked, or just done as reset + patches
+        q.put_nowait(('fullGraph', self.asJsonLd()))  # this should be chunked, or just done as reset + patches
 
     def _onUnsubscribe(self, qref):
         log.info("bye sub", qref)