Skip to content

Commit 964d193

Browse files
committed
Tricky double-sending fix… (more)
All of our messages seem to be being sent twice! Not sure where that’s coming from. This is a temporary fix that synced with the new frontend postMessage hopefully we can revert this.
1 parent b66b017 commit 964d193

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plotly/widgets/graph_widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from collections import deque
22
import json
33
import os
4+
import random
5+
import string
46

57
# TODO: protected imports?
68
from IPython.html import widgets
@@ -88,6 +90,8 @@ def _handle_registration(self, event_type, callback, remove):
8890

8991
def _handle_outgoing_message(self, message):
9092
message['plotlyDomain'] = plotly.plotly.get_config()['plotly_domain']
93+
message['taskID'] = ''.join([random.choice(string.ascii_letters)
94+
for _ in range(20)])
9195
if self._graphId == '':
9296
self._clientMessages.append(message)
9397
else:

0 commit comments

Comments
 (0)