50c87bd8a64ced239cf0e3e12fa0d78de9895574,lib/streamlit/Proxy/websocket.py,ClientWebSocket,open,#ClientWebSocket#,14

Before Change


        throttle_secs = config.get_option("local.throttleSecs")

        // Manages our connection to the local client.
        connection, queue = None, None

        LOGGER.info("Browser websocket opened for "{}"".format(report_name))

    def on_message(self, msg):

After Change


        yield new_report_msg(self._connection.id, self)

        LOGGER.info("Browser websocket opened for "{}"".format(self._report_name))
        while True:
            if not self._queue.is_closed():
                yield self._queue.flush_queue(self)
                yield gen.sleep(throttle_secs)

    def on_message(self, msg):
        data = json.loads(msg)
        payload = json.dumps(data)
        self.write_message(payload, binary=False)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: streamlit/streamlit
Commit Name: 50c87bd8a64ced239cf0e3e12fa0d78de9895574
Time: 2018-06-18
Author: armando@playground.global
File Name: lib/streamlit/Proxy/websocket.py
Class Name: ClientWebSocket
Method Name: open


Project Name: hanxiao/bert-as-service
Commit Name: d97188ee62bc0627235578485c5df7d3245fa1ed
Time: 2018-12-02
Author: hanhxiao@tencent.com
File Name: example6.py
Class Name:
Method Name:


Project Name: hanxiao/bert-as-service
Commit Name: 94476ab74dbb7c16ced3f6b680b822df01c8b9f6
Time: 2018-11-27
Author: hanhxiao@tencent.com
File Name: example5.py
Class Name:
Method Name: