# HG changeset patch # User drewp@bigasterisk.com # Date 1658652963 25200 # Node ID 6d15c808db3eaca51d7da2fa19bfab46b2458342 # Parent 4ba33b77fc328cd1b7521f4e5ea8b56098e6ac65 unbreak clients- the (re)start event is 'fullGraph' not 'graph' diff -r 4ba33b77fc32 -r 6d15c808db3e patchablegraph/handler.py --- 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) diff -r 4ba33b77fc32 -r 6d15c808db3e patchablegraph/patchablegraph.py --- 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)